/* ============================================
   AS WEDDING — Component Styles
   Loader, toast, buttons, cards, dividers, nav
   ============================================ */

/* ================ LOADER ================ */
.loader-overlay {
    position: fixed;
    inset: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    background: var(--ivory);
    z-index: var(--z-loader);
    opacity: 1;
    transition: opacity 0.3s var(--ease-smooth);
    pointer-events: all;
}

.loader-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.loader-monogram {
    font-family: var(--font-heading);
    font-size: var(--fs-3xl);
    font-weight: var(--fw-semibold);
    color: var(--antique-gold);
    letter-spacing: var(--ls-wider);
    animation: breathe 1.8s ease-in-out infinite;
    text-shadow: 0 2px 20px rgba(201, 168, 76, 0.3);
    user-select: none;
}

@keyframes breathe {

    0%,
    100% {
        opacity: 0.5;
        transform: scale(0.96);
    }

    50% {
        opacity: 1;
        transform: scale(1.04);
    }
}

/* ================ TOAST ================ */
.toast-container {
    position: fixed;
    top: var(--space-xl);
    left: 50%;
    transform: translateX(-50%);
    z-index: var(--z-toast);
    pointer-events: none;
    width: 90%;
    max-width: 380px;
}

.toast {
    background: var(--white);
    color: var(--text-primary);
    padding: var(--space-md) var(--space-lg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-elevated);
    border-left: 4px solid var(--antique-gold);
    font-size: var(--fs-sm);
    line-height: var(--lh-snug);
    opacity: 0;
    transform: translateY(-20px);
    animation: toastIn 0.4s var(--ease-bounce) forwards;
    pointer-events: auto;
}

.toast.toast-error {
    border-left-color: var(--deep-burgundy);
}

.toast.toast-out {
    animation: toastOut 0.3s var(--ease-smooth) forwards;
}

@keyframes toastIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes toastOut {
    to {
        opacity: 0;
        transform: translateY(-20px);
    }
}

/* ================ BUTTONS ================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-xs);
    padding: var(--space-sm) var(--space-xl);
    border-radius: var(--radius-full);
    font-family: var(--font-body);
    font-weight: var(--fw-medium);
    font-size: var(--fs-sm);
    letter-spacing: var(--ls-wide);
    text-transform: uppercase;
    transition: all var(--duration-normal) var(--ease-smooth);
    position: relative;
    overflow: hidden;
}

.btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(255, 255, 255, 0.3) 0%, transparent 70%);
    opacity: 0;
    transition: opacity var(--duration-fast);
}

.btn:active::after {
    opacity: 1;
}

.btn-primary {
    background: linear-gradient(135deg, var(--antique-gold), var(--gold-dark));
    color: var(--white);
    border: none;
    box-shadow: 0 4px 15px rgba(201, 168, 76, 0.3);
}

.btn-primary:hover {
    box-shadow: 0 6px 20px rgba(201, 168, 76, 0.45);
    transform: translateY(-1px);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(201, 168, 76, 0.3);
}

.btn-secondary {
    background: transparent;
    color: var(--antique-gold);
    border: 2px solid var(--antique-gold);
}

.btn-secondary:hover {
    background: var(--antique-gold);
    color: var(--white);
}

.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--gold-light);
}

.btn-outline:hover {
    border-color: var(--antique-gold);
    color: var(--antique-gold);
}

.btn-burgundy {
    background: linear-gradient(135deg, var(--deep-burgundy), var(--burgundy-dark));
    color: var(--white);
    box-shadow: 0 4px 15px rgba(107, 39, 55, 0.3);
}

.btn-lg {
    padding: var(--space-md) var(--space-2xl);
    font-size: var(--fs-base);
}

.btn-sm {
    padding: var(--space-xs) var(--space-lg);
    font-size: var(--fs-xs);
}

.btn-block {
    width: 100%;
}

/* ================ CARDS ================ */
.card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    box-shadow: var(--shadow-card);
    position: relative;
}

.card-gold {
    border: 1px solid var(--gold-light);
}

.card-arch {
    border: 1px solid var(--gold-light);
    border-radius: var(--radius-lg) var(--radius-lg) var(--radius-lg) var(--radius-lg);
    overflow: hidden;
}

.card-arch::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: 6px;
    background: linear-gradient(90deg, transparent, var(--antique-gold), transparent);
    border-radius: 0 0 50% 50%;
}

/* ================ DIVIDERS ================ */
.divider-gold {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin: var(--space-xl) 0;
}

.divider-gold::before,
.divider-gold::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--antique-gold), transparent);
}

.divider-gold-icon {
    color: var(--antique-gold);
    font-size: var(--fs-sm);
}

.divider-simple {
    width: 60px;
    height: 1px;
    background: var(--antique-gold);
    margin: var(--space-lg) auto;
}

/* ================ FLORAL ORNAMENT ================ */
.floral-ornament {
    text-align: center;
    font-size: var(--fs-xl);
    color: var(--antique-gold);
    opacity: 0.6;
    line-height: 1;
    user-select: none;
}

.floral-ornament::before {
    content: '✿ ❋ ✿';
    letter-spacing: var(--ls-wider);
}

.floral-ornament-sm::before {
    content: '· ✧ ·';
    font-size: var(--fs-sm);
}

.floral-corner {
    position: absolute;
    color: var(--antique-gold);
    opacity: 0.25;
    font-size: var(--fs-xl);
    line-height: 1;
}

.floral-corner.top-left {
    top: var(--space-md);
    left: var(--space-md);
}

.floral-corner.top-right {
    top: var(--space-md);
    right: var(--space-md);
    transform: scaleX(-1);
}

.floral-corner.bottom-left {
    bottom: var(--space-md);
    left: var(--space-md);
    transform: scaleY(-1);
}

.floral-corner.bottom-right {
    bottom: var(--space-md);
    right: var(--space-md);
    transform: scale(-1);
}

/* ================ NAVIGATION ================ */
.back-arrow {
    position: fixed;
    top: calc(var(--space-md) + var(--safe-area-top));
    left: var(--space-md);
    z-index: var(--z-sticky);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(250, 247, 242, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: var(--radius-full);
    border: 1px solid var(--gold-light);
    color: var(--text-primary);
    font-size: var(--fs-lg);
    transition: all var(--duration-fast) var(--ease-smooth);
    cursor: pointer;
}

.back-arrow:hover {
    background: var(--white);
    box-shadow: var(--shadow-soft);
}

.lang-toggle {
    position: fixed;
    top: calc(var(--space-md) + var(--safe-area-top));
    right: var(--space-md);
    z-index: var(--z-sticky);
    padding: var(--space-2xs) var(--space-sm);
    background: rgba(250, 247, 242, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: var(--radius-full);
    border: 1px solid var(--gold-light);
    color: var(--text-light);
    font-size: var(--fs-xs);
    font-weight: var(--fw-medium);
    letter-spacing: var(--ls-wide);
    transition: all var(--duration-fast) var(--ease-smooth);
    cursor: pointer;
}

.lang-toggle:hover {
    background: var(--white);
    border-color: var(--antique-gold);
    color: var(--antique-gold);
}

/* ================ INPUT FIELDS ================ */
.input-field {
    width: 100%;
    padding: var(--space-md) var(--space-lg);
    background: var(--ivory);
    border: 1.5px solid var(--gold-light);
    border-radius: var(--radius-lg);
    font-size: var(--fs-md);
    color: var(--text-primary);
    transition: border-color var(--duration-fast) var(--ease-smooth);
    text-align: center;
    letter-spacing: var(--ls-wider);
}

.input-field:focus {
    border-color: var(--antique-gold);
    box-shadow: 0 0 0 3px rgba(201, 168, 76, 0.1);
}

.input-field::placeholder {
    color: var(--text-light);
    opacity: 0.6;
    letter-spacing: var(--ls-wide);
}

.input-error {
    border-color: var(--deep-burgundy);
}

.error-text {
    color: var(--deep-burgundy);
    font-size: var(--fs-sm);
    margin-top: var(--space-xs);
    text-align: center;
}

/* ================ SCROLL INDICATOR ================ */
.scroll-indicator {
    position: absolute;
    bottom: var(--space-xl);
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-2xs);
    color: var(--text-light);
    font-size: var(--fs-xs);
    letter-spacing: var(--ls-wide);
    opacity: 0.7;
    animation: scrollBounce 2s ease-in-out infinite;
}

.scroll-indicator .chevron {
    font-size: var(--fs-lg);
    animation: chevronPulse 2s ease-in-out infinite;
}

@keyframes scrollBounce {

    0%,
    100% {
        transform: translateX(-50%) translateY(0);
    }

    50% {
        transform: translateX(-50%) translateY(6px);
    }
}

@keyframes chevronPulse {

    0%,
    100% {
        opacity: 0.4;
    }

    50% {
        opacity: 1;
    }
}

/* ================ MONOGRAM ================ */
.monogram {
    font-family: var(--font-heading);
    font-weight: var(--fw-semibold);
    color: var(--antique-gold);
    letter-spacing: var(--ls-wider);
    user-select: none;
}

.monogram-lg {
    font-size: var(--fs-4xl);
    text-shadow: 0 2px 20px rgba(201, 168, 76, 0.3);
}

.monogram-md {
    font-size: var(--fs-2xl);
}

.monogram-sm {
    font-size: var(--fs-xl);
}

/* ================ COUNTDOWN ================ */
.countdown {
    display: flex;
    gap: var(--space-xs);
    justify-content: center;
    align-items: baseline;
}

.countdown-unit {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.countdown-value {
    font-family: var(--font-heading);
    font-size: var(--fs-xl);
    font-weight: var(--fw-semibold);
    color: var(--text-primary);
    min-width: 2ch;
    text-align: center;
}

.countdown-label {
    font-size: var(--fs-xs);
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: var(--ls-wide);
}

.countdown-separator {
    font-family: var(--font-heading);
    font-size: var(--fs-xl);
    color: var(--antique-gold);
    padding-bottom: var(--space-md);
}

.countdown-small .countdown-value {
    font-size: var(--fs-base);
}

.countdown-small .countdown-label {
    font-size: 0.55rem;
}

.countdown-small .countdown-separator {
    font-size: var(--fs-base);
    padding-bottom: var(--space-sm);
}

.countdown-celebration {
    font-family: var(--font-heading);
    font-size: var(--fs-lg);
    color: var(--antique-gold);
    text-align: center;
}