/**
 * Alpa × LearnDeck bridge: map site tokens to LearnDeck CSS variables,
 * tune header offset for our sticky chrome, and minimal layout fixes.
 */
:root {
    --ld-header-offset: 5.75rem;
    --ld-header-offset-md: 5.25rem;
    --ld-header-offset-sm: 5rem;
}

/* Align LearnDeck primary with Alpa brand (optional visual harmony) */
body.ld-public-theme {
    --primary-color: #08455c;
    --primary-dark: #063747;
    --primary-light: #0f5f7a;
}

/* Main content readable width when LearnDeck globals affect typography */
#main-content {
    min-height: 50vh;
}

/* Reveal / AOS without animations.scss: default visible, animate only when JS is active. */
.reveal,
.reveal-stagger > *,
[data-aos] {
    opacity: 1;
    transform: none;
}

html.ld-js .reveal,
html.ld-js .reveal-stagger > *,
html.ld-js [data-aos] {
    opacity: 0;
    transform: translateY(0.75rem);
    transition:
        opacity 0.55s ease,
        transform 0.55s ease;
}

.reveal.is-visible,
.reveal-stagger.is-visible > *,
[data-aos].aos-animate {
    opacity: 1;
    transform: none;
}

/* Prevent LearnDeck's base [data-aos] pointer-events lock from blocking forms. */
body.ld-public-theme [data-aos] {
    pointer-events: auto !important;
}

@media (prefers-reduced-motion: reduce) {
    .reveal,
    .reveal-stagger > *,
    [data-aos] {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
}

/* Viewport highlight fallback (minimal) */
.highlight-on-view-init {
    opacity: 0.96;
    transition:
        opacity 0.45s ease,
        transform 0.45s ease;
}

.highlight-on-view-active {
    opacity: 1;
}

/* Admission wizard (from visuals.scss — public bundle omits that import) */
.alpa-admission-wizard:not(.is-enhanced) .admission-stepper,
.alpa-admission-wizard:not(.is-enhanced) .admission-wizard-meta,
.alpa-admission-wizard:not(.is-enhanced) [data-admission-prev],
.alpa-admission-wizard:not(.is-enhanced) [data-admission-next] {
    display: none;
}

.alpa-admission-wizard:not(.is-enhanced) [data-admission-submit] {
    display: inline-flex;
}

.alpa-admission-wizard .admission-stepper {
    margin-bottom: 0.2rem;
}

.alpa-admission-wizard .admission-stepper-track {
    height: 0.3rem;
    border-radius: 999px;
    background: rgb(203 213 225 / 0.65);
    overflow: hidden;
}

.alpa-admission-wizard .admission-stepper-progress {
    display: block;
    width: 0%;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #0f4f67, #2f7f72);
    transition: width 0.35s ease;
}

.alpa-admission-wizard .admission-stepper-items {
    margin-top: 0.85rem;
    display: grid;
    gap: 0.5rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.alpa-admission-wizard .admission-wizard-meta {
    margin-top: 0.9rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.65rem;
}

.alpa-admission-wizard .admission-meta-note {
    margin: 0;
    font-size: 0.84rem;
    color: rgb(71 85 105);
}

.alpa-admission-wizard .admission-completion-pill {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    border: 1px solid rgb(148 163 184 / 0.52);
    background: rgb(241 245 249 / 0.95);
    padding: 0.3rem 0.65rem;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    color: rgb(30 41 59);
}

.alpa-admission-wizard .admission-step-indicator {
    border-radius: 0.85rem;
    border: 1px solid rgb(203 213 225 / 0.86);
    background: rgb(255 255 255 / 0.82);
    padding: 0.55rem 0.65rem;
    text-align: center;
    font-size: 0.8rem;
    font-weight: 700;
    color: rgb(71 85 105);
    cursor: default;
}

.alpa-admission-wizard .admission-step-indicator.is-active {
    border-color: rgb(15 79 103 / 0.45);
    background: rgb(240 249 255 / 0.96);
    color: rgb(8 69 92);
}

.alpa-admission-wizard .admission-step-indicator.is-complete {
    border-color: rgb(47 127 114 / 0.45);
    color: rgb(15 118 110);
}

.alpa-admission-wizard.is-enhanced .admission-step-panel {
    display: none;
    opacity: 0;
    transform: translateY(12px);
}

.alpa-admission-wizard.is-enhanced .admission-step-panel.is-active {
    display: block;
    opacity: 1;
    transform: translateY(0);
    transition:
        opacity 0.35s ease,
        transform 0.35s ease;
}

.alpa-admission-wizard [data-step-field-wrap] {
    border-radius: 0.95rem;
    padding: 0.45rem;
}

.alpa-admission-wizard [data-step-field-wrap]:focus-within {
    background: rgb(248 250 252 / 0.9);
    box-shadow: 0 10px 20px -18px rgb(8 69 92 / 0.45);
}

.dark .alpa-admission-wizard .admission-stepper-track {
    background: rgb(71 85 105 / 0.7);
}

.dark .alpa-admission-wizard .admission-step-indicator {
    border-color: rgb(71 85 105 / 0.8);
    background: rgb(15 23 42 / 0.72);
    color: rgb(203 213 225);
}

.dark .alpa-admission-wizard .admission-meta-note {
    color: rgb(148 163 184);
}

.dark .alpa-admission-wizard .admission-completion-pill {
    border-color: rgb(71 85 105 / 0.92);
    background: rgb(30 41 59 / 0.86);
    color: rgb(226 232 240);
}

.alpa-form-control.is-invalid {
    border-color: rgb(225 29 72 / 0.65) !important;
}

/* LearnDeck header chrome is fixed-position; Alpa uses in-flow top bar + sticky navbar. */
body.ld-public-theme {
    padding-top: 0 !important;
}

body.ld-public-theme .top-bar {
    position: relative;
    top: auto;
    left: auto;
    right: auto;
    z-index: 1020;
}

body.ld-public-theme .navbar.site-header {
    position: sticky;
    top: 0 !important;
    left: auto;
    right: auto;
    width: 100%;
    z-index: 1030;
}

.dark body.ld-public-theme .navbar.site-header {
    background: rgba(15, 23, 42, 0.95) !important;
    border-bottom-color: rgba(255, 255, 255, 0.08);
}

.dark body.ld-public-theme .navbar-nav .nav-link {
    color: rgb(226 232 240) !important;
}

.dark body.ld-public-theme .navbar-nav .nav-link.active,
.dark body.ld-public-theme .navbar-nav .nav-link:hover {
    color: var(--white) !important;
}
