/**
 * DOCSYSTEM ENTERPRISE - Modal & Dialog System
 * Aesthetic inspired by modern premium iOS/macOS card design (Captura 2).
 */

.enterprise-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 999999;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.enterprise-modal-backdrop.is-active {
    opacity: 1;
    visibility: visible;
}

.enterprise-modal-card {
    width: 100%;
    max-width: 440px;
    background: #ffffff;
    border-radius: 26px;
    padding: 16px;
    box-shadow: 0 30px 60px -12px rgba(15, 23, 42, 0.25), 0 0 0 1px rgba(0, 0, 0, 0.06);
    transform: scale(0.92) translateY(14px);
    opacity: 0;
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    font-family: 'Outfit', 'Inter', system-ui, -apple-system, sans-serif;
}

.enterprise-modal-backdrop.is-active .enterprise-modal-card {
    transform: scale(1) translateY(0);
    opacity: 1;
}

/* Header styled with the champagne/sage card and avatar ring from Captura 2 */
.enterprise-modal-header {
    border-radius: 20px;
    padding: 16px 20px;
    background: linear-gradient(135deg, #fbfbf9 0%, #f1f4ee 100%);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 16px;
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.enterprise-modal-header.type-danger {
    background: linear-gradient(135deg, #fff8f8 0%, #fee2e2 100%);
    border-color: #fecaca;
}

.enterprise-modal-header.type-warning {
    background: linear-gradient(135deg, #fffcf5 0%, #fef3c7 100%);
    border-color: #fde68a;
}

.enterprise-modal-header.type-primary {
    background: linear-gradient(135deg, #f8faff 0%, #eff6ff 100%);
    border-color: #dbeafe;
}

.enterprise-modal-meta {
    flex: 1;
    min-width: 0;
}

.enterprise-modal-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 3px;
    line-height: 1.3;
}

.enterprise-modal-subtitle {
    font-size: 0.84rem;
    color: #64748b;
    font-weight: 500;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Avatar Ring with double border/gradient border like in Captura 2 */
.enterprise-modal-avatar-ring {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    padding: 2.5px;
    flex-shrink: 0;
    background: linear-gradient(135deg, #a3e635 0%, #eab308 100%);
    box-shadow: 0 4px 12px rgba(163, 230, 53, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
}

.enterprise-modal-header.type-danger .enterprise-modal-avatar-ring {
    background: linear-gradient(135deg, #f43f5e 0%, #e11d48 100%);
    box-shadow: 0 4px 12px rgba(244, 63, 94, 0.25);
}

.enterprise-modal-header.type-warning .enterprise-modal-avatar-ring {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.25);
}

.enterprise-modal-header.type-primary .enterprise-modal-avatar-ring {
    background: linear-gradient(135deg, #4f46e5 0%, #3b82f6 100%);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.25);
}

.enterprise-modal-avatar-inner {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0f172a;
}

.enterprise-modal-header.type-danger .enterprise-modal-avatar-inner {
    color: #e11d48;
}

.enterprise-modal-header.type-warning .enterprise-modal-avatar-inner {
    color: #d97706;
}

.enterprise-modal-header.type-primary .enterprise-modal-avatar-inner {
    color: #4f46e5;
}

.enterprise-modal-body {
    padding: 4px 8px 14px;
}

.enterprise-modal-message {
    font-size: 0.94rem;
    color: #334155;
    line-height: 1.55;
    margin: 0 0 16px;
}

/* Feature Item Pill (matching Community Pro badge in Captura 2) */
.enterprise-modal-detail-pill {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.enterprise-modal-pill-left {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.88rem;
    font-weight: 600;
    color: #1e293b;
}

.enterprise-badge-pro {
    background: #f3e8ff;
    color: #9333ea;
    font-weight: 700;
    font-size: 11px;
    padding: 3px 10px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.enterprise-badge-pro.pro-blue {
    background: #eff6ff;
    color: #2563eb;
}

.enterprise-badge-pro.pro-red {
    background: #fee2e2;
    color: #dc2626;
}

/* Action Footer with elegant rounded pill buttons */
.enterprise-modal-footer {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: flex-end;
    padding: 6px 4px 4px;
}

.enterprise-modal-btn {
    border: none;
    outline: none;
    border-radius: 14px;
    padding: 11px 22px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    font-family: inherit;
}

.enterprise-modal-btn.btn-cancel {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
}

.enterprise-modal-btn.btn-cancel:hover {
    background: #e2e8f0;
    color: #0f172a;
}

.enterprise-modal-btn.btn-confirm {
    background: linear-gradient(135deg, #4f46e5 0%, #3b82f6 100%);
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(79, 70, 229, 0.3);
}

.enterprise-modal-btn.btn-confirm:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(79, 70, 229, 0.38);
}

.enterprise-modal-btn.btn-confirm.type-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.3);
}

.enterprise-modal-btn.btn-confirm.type-danger:hover {
    box-shadow: 0 6px 18px rgba(239, 68, 68, 0.38);
}

.enterprise-modal-btn.btn-confirm.type-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.3);
}

.enterprise-modal-btn.btn-confirm.type-warning:hover {
    box-shadow: 0 6px 18px rgba(245, 158, 11, 0.38);
}
