/* =============================================================================
 * OMS SSO — Enterprise Design System
 * Shared component library for all support/post-auth pages
 * =============================================================================
 * This file defines reusable UI components that are NOT specific to any single
 * page. Page-specific overrides go in cas.css (theme section per page).
 *
 * Components:
 *   - Enterprise Card (.enterprise-card)
 *   - Status Icons (.status-icon)
 *   - Status Header (.status-header)
 *   - Info Section (.info-section)
 *   - Enterprise Buttons (.enterprise-btn)
 *   - Security Note (.security-note)
 *   - Button Group (.button-group)
 *   - Screen Reader Only (.sr-only)
 *
 * Load order:
 *   1. CAS core CSS
 *   2. Font Awesome Pro (all.min.css + solid.min.css + regular.min.css)
 *   3. THIS FILE
 *   4. Theme CSS (cas.css) — page-specific additions
 *   5. custom.css — global overrides
 * =========================================================================== */

/* ==========================================================================
   ENTERPRISE CARD
   ========================================================================== */

.enterprise-card {
    background-color: var(--compass-white, #ffffff);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    padding: 2.5rem;
    position: relative;
    overflow: hidden;
    max-width: 520px;
    margin: 0 auto;
}

.enterprise-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, var(--compass-primary, #003366) 0%, var(--compass-primary-light, #004488) 100%);
    border-radius: 12px 12px 0 0;
}

/* ==========================================================================
   STATUS ICON
   ========================================================================== */

.status-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    margin: 0 auto 1rem;
    border-radius: 50%;
    font-size: 1.75rem;
    color: var(--compass-white, #ffffff);
}

/* ==========================================================================
   STATUS HEADER
   ========================================================================== */

.status-header {
    text-align: center;
    margin-bottom: 1.75rem;
}

.status-header .status-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--compass-gray-900, #212529);
    margin: 0 0 0.5rem 0;
}

.status-header .status-subtitle {
    font-size: 0.875rem;
    color: var(--compass-gray-600, #6c757d);
    margin: 0;
    font-weight: 400;
    line-height: 1.5;
}

/* ==========================================================================
   INFO SECTION
   ========================================================================== */

.info-section {
    background: rgba(0, 51, 102, 0.03);
    border: 1px solid rgba(0, 51, 102, 0.08);
    border-radius: 8px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
}

.info-section .info-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--compass-gray-800, #343a40);
    margin: 0 0 0.5rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.info-section .info-title i {
    color: var(--compass-primary, #003366);
}

.info-section .info-text {
    font-size: 0.875rem;
    color: var(--compass-gray-600, #6c757d);
    line-height: 1.5;
    margin: 0;
}

/* ==========================================================================
   ENTERPRISE BUTTONS
   ========================================================================== */

.enterprise-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.625rem 1.25rem;
    border: none;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 600;
    font-family: inherit;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.15s ease-out, transform 0.15s ease-out, box-shadow 0.15s ease-out, border-color 0.15s ease-out;
    min-height: 40px;
    box-sizing: border-box;
    line-height: 1.4;
}

.enterprise-btn:focus-visible {
    outline: 2px solid var(--compass-accent, #E87722);
    outline-offset: 2px;
}

.enterprise-btn i {
    margin-right: 0.5rem;
    font-size: 0.875rem;
}

/* Primary */
.enterprise-btn-primary {
    background-color: var(--compass-primary, #003366);
    color: var(--compass-white, #ffffff);
    box-shadow: 0 2px 8px rgba(0, 51, 102, 0.2);
}

.enterprise-btn-primary:hover:not(:disabled) {
    background-color: var(--compass-primary-light, #004488);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 51, 102, 0.3);
    color: var(--compass-white, #ffffff);
    text-decoration: none;
}

.enterprise-btn-primary:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: 0 1px 4px rgba(0, 51, 102, 0.2);
}

.enterprise-btn-primary:disabled {
    background-color: var(--compass-gray-300, #dee2e6);
    color: var(--compass-gray-500, #adb5bd);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Secondary */
.enterprise-btn-secondary {
    background-color: var(--compass-white, #ffffff);
    color: var(--compass-gray-700, #495057);
    border: 1.5px solid var(--compass-gray-300, #dee2e6);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.enterprise-btn-secondary:hover:not(:disabled) {
    background-color: var(--compass-gray-50, #f8f9fa);
    border-color: var(--compass-primary, #003366);
    color: var(--compass-primary, #003366);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 51, 102, 0.1);
    text-decoration: none;
}

/* ==========================================================================
   BUTTON GROUP
   ========================================================================== */

.button-group {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.button-group .enterprise-btn {
    flex: 1;
}

/* Centered variant: auto-width button(s), centered in the row */
.button-group--centered {
    justify-content: center;
}

.button-group--centered .enterprise-btn {
    flex: 0 0 auto;
}

/* ==========================================================================
   SECURITY NOTE
   ========================================================================== */

.security-note {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    background: rgba(0, 51, 102, 0.03);
    border: 1px solid rgba(0, 51, 102, 0.1);
    border-radius: 8px;
    color: var(--compass-primary, #003366);
    font-size: 0.75rem;
    font-weight: 500;
    margin-top: 1.5rem;
    line-height: 1.5;
}

.security-note i {
    color: var(--compass-primary, #003366);
    font-size: 0.875rem;
    flex-shrink: 0;
}

/* ==========================================================================
   SUPPORT DISCLOSURE (collapsible support section)
   ========================================================================== */

.support-disclosure {
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(0, 51, 102, 0.08);
    border-radius: 8px;
    overflow: hidden;
}

.support-disclosure-trigger {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--compass-gray-800, #343a40);
    cursor: pointer;
    background: rgba(0, 51, 102, 0.03);
    list-style: none;
    user-select: none;
}

.support-disclosure-trigger::-webkit-details-marker {
    display: none;
}

.support-disclosure-trigger:hover {
    background: rgba(0, 51, 102, 0.05);
}

.support-disclosure-trigger i:first-child {
    color: var(--compass-primary, #003366);
    font-size: 0.875rem;
}

.support-disclosure-chevron {
    margin-left: auto;
    font-size: 0.7rem;
    color: var(--compass-gray-500, #adb5bd);
    transition: transform 0.2s ease-out;
}

.support-disclosure[open] .support-disclosure-chevron {
    transform: rotate(180deg);
}

.support-disclosure-content {
    padding: 0.5rem 1.25rem 1rem;
}

/* ==========================================================================
   SCREEN READER ONLY
   ========================================================================== */

.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

@media (max-width: 768px) {
    .enterprise-card {
        max-width: 100%;
        margin: 0 1rem;
    }
}

@media (max-width: 576px) {
    .enterprise-card {
        padding: 1.5rem 1.25rem;
        border-radius: 8px;
        margin: 0 0.5rem;
    }

    .status-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }

    .status-header .status-title {
        font-size: 1.15rem;
    }

    .button-group {
        flex-direction: column;
    }
}

/* ==========================================================================
   ACCESSIBILITY
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
    .enterprise-btn {
        transition: none;
    }

    .support-disclosure-chevron {
        transition: none;
    }
}

@media (prefers-contrast: high) {
    .enterprise-card {
        border: 2px solid #000;
    }

    .enterprise-btn-primary {
        border: 2px solid #000;
    }

    .enterprise-btn-secondary {
        border: 2px solid #000;
    }

    .security-note {
        border: 2px solid currentColor;
    }

    .support-disclosure {
        border: 2px solid #000;
    }
}
