/* Internet2 Identity Enrollment - Base Styles */

/* ==========================================================================
   Design Tokens
   Palette matches the shared Internet2 SSO/access UI (example-base.css)
   so this app feels consistent with our other applications.
   ========================================================================== */
:root {
    --primary-blue: #1B6D95;
    --secondary-blue: #376d90;
    --primary-blue-rgb: 27, 109, 149;
    --secondary-blue-rgb: 55, 109, 144;

    --white: #ffffff;

    --text-heading: #2d3748;
    --text-body: #4a5568;
    --text-muted: #6b7280;

    --border-light: #e2e8f0;
    --bg-page: #f5f7fa;

    --tint-blue-bg: #eaf3f8;
    --tint-blue-border: #bcdcea;

    --success-bg: #f0fdf4;
    --success-border: #86efac;
    --success-heading: #166534;
    --success-text: #15803d;

    --warning-bg: #fff3cd;
    --warning-border: #ffc107;
    --warning-text: #856404;

    --error-bg: #fed7d7;
    --error-border: #feb2b2;
    --error-text: #742a2a;

    --radius-lg: 8px;
    --radius-md: 6px;
    --radius-sm: 5px;
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Helvetica, Arial, sans-serif;
    background: var(--bg-page);
    color: #333;
    line-height: 1.6;
    min-height: 100vh;
    padding: 2rem 0;
}

/* Layout Components */
.container {
    max-width: 800px;
    margin: 0 auto;
    background: var(--white);
    border: 1px solid rgba(0,0,0,.08);
    border-radius: var(--radius-lg);
    box-shadow: 0 4px 16px rgba(0,0,0,0.06);
    overflow: hidden;
}

.container.narrow {
    max-width: 700px;
}

.container.wide {
    max-width: 1000px;
}

/* Header Styles */
.header {
    background: var(--primary-blue);
    color: var(--white);
    padding: 2rem;
    text-align: center;
    position: relative;
}

.header.large {
    padding: 1.75rem 2rem;
}

.header-content {
    position: relative;
    z-index: 1;
}

.logo {
    max-width: 180px;
    height: auto;
    margin-bottom: 1rem;
    filter: brightness(0) invert(1);
}

.logo.large {
    max-width: 190px;
    margin-bottom: 1rem;
}

.header h1 {
    font-size: 1.8rem;
    font-weight: 400;
    margin-bottom: 0.5rem;
    color: var(--white);
}

.header h1.large {
    font-size: 1.9rem;
    margin-bottom: 0.75rem;
    line-height: 1.25;
}

.header p,
.header .subtitle {
    color: rgba(255,255,255,0.95);
    font-size: 0.95rem;
}

.header .subtitle {
    font-size: 1.1rem;
    font-weight: 300;
}

/* Content Area */
.content {
    padding: 2rem;
}

.content.large {
    padding: 2rem 2rem;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    color: var(--text-heading);
    margin-bottom: 1rem;
}

h2 {
    font-size: 1.8rem;
    font-weight: 600;
}

h3 {
    font-size: 1.3rem;
    font-weight: 600;
}

h4 {
    font-size: 1.1rem;
    font-weight: 600;
}

p {
    color: var(--text-body);
    margin-bottom: 1rem;
}

a {
    color: var(--primary-blue);
    text-decoration: underline;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--secondary-blue);
}

/* Utility Classes */
.text-center {
    text-align: center;
}

/* Visually hides content while keeping it available to screen readers --
   e.g. a live region that announces a status change without needing a
   visible element to hold the text. */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.mb-2 { margin-bottom: 2rem; }

/* Progress Bar */
.progress-bar {
    background: var(--border-light);
    height: 4px;
    border-radius: 2px;
    margin-bottom: 2rem;
    overflow: hidden;
}

.progress-fill {
    background: var(--primary-blue);
    height: 100%;
    transition: width 0.3s ease;
}

/* Info Boxes */
.info-box {
    background: #f8f9fa;
    border-left: 4px solid var(--primary-blue);
    padding: 1rem;
    border-radius: var(--radius-md);
    margin-bottom: 2rem;
}

.info-box h2,
.info-box h3,
.info-box h4 {
    color: var(--text-heading);
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.info-box p {
    color: var(--text-body);
    margin: 0.25rem 0;
    font-size: 0.9rem;
}

.info-box ul,
.info-box ol {
    padding-left: 1.25rem;
    margin: 0.5rem 0;
    color: var(--text-body);
    font-size: 0.9rem;
}

.info-box li {
    margin-bottom: 0.25rem;
}

.info-box li:last-child {
    margin-bottom: 0;
}

.info-box.blue {
    background: var(--tint-blue-bg);
    border-color: var(--tint-blue-border);
}

.info-box.blue h2,
.info-box.blue h3,
.info-box.blue h4 {
    color: var(--primary-blue);
}

.info-box.blue p {
    color: var(--secondary-blue);
}

.info-box.green {
    background: var(--success-bg);
    border-color: var(--success-border);
}

.info-box.green h2,
.info-box.green h3,
.info-box.green h4 {
    color: var(--success-heading);
}

.info-box.green p {
    color: var(--success-text);
}

.info-box.yellow {
    background: var(--warning-bg);
    border-color: var(--warning-border);
}

.info-box.yellow h2,
.info-box.yellow h3,
.info-box.yellow h4 {
    color: var(--warning-text);
}

.info-box.yellow p {
    color: var(--warning-text);
}

.info-box.red {
    background: var(--error-bg);
    border-color: var(--error-border);
}

/* Links on the red (error) info-box tint: the default brand blue is only
   ~4.33:1 on #fed7d7; darken so link text clears 4.5:1 (WCAG 1.4.3). */
.info-box.red a {
    color: #155470;
}

/* Loading State */
.loading {
    opacity: 0.7;
    pointer-events: none;
}

/* Accessible focus indicator, consistent across all interactive elements.
   Browsers already show a default focus ring; this makes it match the
   app's palette and guarantees visibility (WCAG 2.4.7). */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
.btn:focus-visible,
[tabindex]:focus-visible {
    outline: 3px solid var(--secondary-blue);
    outline-offset: 2px;
}

/* Respect the user's OS-level motion preference. Anything animated in
   this app (hover shimmer, pulse, confetti, spinners) gets effectively
   neutralized rather than removed, so the app degrades gracefully. */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        padding: 1rem 0;
    }
    
    .container {
        margin: 1rem;
        border-radius: var(--radius-md);
    }

    .header,
    .content {
        padding: 1.5rem;
    }

    .header.large,
    .content.large {
        padding: 1.5rem 1rem;
    }

    .header h1.large {
        font-size: 1.6rem;
    }

    .logo.large {
        max-width: 160px;
    }
}

@media (max-width: 480px) {
    .header h1 {
        font-size: 1.5rem;
    }

    .header h1.large {
        font-size: 1.3rem;
    }

    .header .subtitle {
        font-size: 1rem;
    }

    .content,
    .content.large {
        padding: 1.5rem 1rem;
    }
}
