/* =============================================================================
   Walkthrough theme (EN) — shared by the walkthrough (en/designs.php),
   the upgrade page (en/upgrade_page.php) and My Invitations (en/invitations.php).
   Loaded through ivw_theme_head_tags() in en/includes/theme.php.
   ============================================================================= */

.font-script { font-family: 'Alex Brush', cursive; }
.font-serif-title { font-family: 'Playfair Display', Georgia, serif; }
.font-cormorant { font-family: 'Cormorant Garamond', Georgia, serif; }

/* Direction-aware step slide */
@keyframes stepEnterFromRight {
    0% {
        opacity: 0;
        transform: translate3d(36px, 0, 0);
    }
    100% {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

@keyframes stepEnterFromLeft {
    0% {
        opacity: 0;
        transform: translate3d(-36px, 0, 0);
    }
    100% {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

@keyframes textStaggerUp {
    0% {
        opacity: 0;
        transform: translate3d(0, 16px, 0);
    }
    100% {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

.step-anim-forward {
    animation: stepEnterFromRight 0.42s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.step-anim-backward {
    animation: stepEnterFromLeft 0.42s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* Staggered text animations inside active step */
.step-anim-forward .step-title-script,
.step-anim-backward .step-title-script {
    animation: textStaggerUp 0.45s cubic-bezier(0.16, 1, 0.3, 1) 0.04s both;
}

.step-anim-forward .step-title-main,
.step-anim-backward .step-title-main {
    animation: textStaggerUp 0.45s cubic-bezier(0.16, 1, 0.3, 1) 0.10s both;
}

.step-anim-forward .step-title-sub,
.step-anim-backward .step-title-sub {
    animation: textStaggerUp 0.45s cubic-bezier(0.16, 1, 0.3, 1) 0.16s both;
}

.step-anim-forward .step-content-body,
.step-anim-backward .step-content-body {
    animation: textStaggerUp 0.45s cubic-bezier(0.16, 1, 0.3, 1) 0.22s both;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}
.shimmer-bg {
    background: linear-gradient(90deg, #c79544 0%, #fbe8af 50%, #c79544 100%);
    background-size: 200% 100%;
    animation: shimmer 3s infinite linear;
}

/* Seamless Modern Inputs blending into page background */
.walkthrough-input {
    background: rgba(255, 255, 255, 0.38);
    border: 1px solid rgba(199, 149, 68, 0.22);
    border-radius: 12px;
    padding: 13px 16px;
    font-size: 15px;
    color: #2b2623;
    width: 100%;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}
.walkthrough-input:hover {
    border-color: rgba(199, 149, 68, 0.45);
    background: rgba(255, 255, 255, 0.55);
}
.walkthrough-input:focus {
    background: rgba(255, 255, 255, 0.85);
    border-color: #c79544 !important;
    box-shadow: 0 0 0 3px rgba(199, 149, 68, 0.16) !important;
}
.walkthrough-input:disabled {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(199, 149, 68, 0.12);
    color: #78716c;
    cursor: not-allowed;
}

/* Seamless Modern Package Cards */
.package-card {
    background: rgba(255, 255, 255, 0.3);
    border: 1px solid rgba(199, 149, 68, 0.2);
    border-radius: 16px;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.package-card:hover {
    background: rgba(255, 255, 255, 0.55);
    border-color: rgba(199, 149, 68, 0.45);
    transform: translateY(-2px);
}
.package-card.is-selected {
    background: rgba(255, 255, 255, 0.65);
    border: 1.5px solid #c79544;
    box-shadow: 0 6px 20px -2px rgba(199, 149, 68, 0.18);
}

/* Big Theme-Colored Toggle Switches */
.theme-switch-label {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
    position: relative;
}
.theme-switch-label input[type="checkbox"],
input[type="checkbox"].sr-only,
.sr-only {
    position: absolute !important;
    opacity: 0 !important;
    width: 1px !important;
    height: 1px !important;
    margin: -1px !important;
    padding: 0 !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
    pointer-events: none !important;
}
.theme-switch-track {
    width: 58px;
    height: 32px;
    background-color: rgba(120, 113, 108, 0.28);
    border: 2px solid rgba(199, 149, 68, 0.25);
    border-radius: 9999px;
    position: relative;
    transition: background-color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
    flex-shrink: 0;
}
.theme-switch-track::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 3px;
    width: 24px;
    height: 24px;
    background-color: #ffffff;
    border-radius: 9999px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.18);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.25s ease;
}
input:checked + .theme-switch-track {
    background-color: #c79544;
    border-color: #b08235;
    box-shadow: 0 0 12px rgba(199, 149, 68, 0.35);
}
input:checked + .theme-switch-track::after {
    transform: translateX(26px);
}
.theme-switch-status {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-left: 12px;
    color: #78716c;
    transition: color 0.2s ease;
}
input:checked ~ .theme-switch-status {
    color: #c79544;
}

/* Milestone Chips and Row Animations */
@keyframes chipEntrance {
    0% {
        opacity: 0;
        transform: translate3d(0, 8px, 0) scale(0.95);
    }
    100% {
        opacity: 1;
        transform: translate3d(0, 0, 0) scale(1);
    }
}
.chip-anim {
    animation: chipEntrance 0.32s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes rowEntrance {
    0% {
        opacity: 0;
        transform: translate3d(0, 10px, 0);
    }
    100% {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}
.itinerary-row-anim {
    animation: rowEntrance 0.30s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* ---------------------------------------------------------------
   Walkthrough buttons (shared by every design)
     .wt-btn + --primary (continue / main action) · --dark (preview)
             · --ghost (back / secondary) · --outline (add actions)
     sizes: --sm · --lg · --block
   --------------------------------------------------------------- */
.wt-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 2.75rem;
    padding: 0.7rem 1.35rem;
    border: 1px solid transparent;
    border-radius: 0.9rem;
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.2;
    text-align: center;
    cursor: pointer;
    user-select: none;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease, opacity 0.2s ease;
}
.wt-btn.hidden { display: none; }
.wt-btn svg { width: 1rem; height: 1rem; flex-shrink: 0; margin: 0; }
.wt-btn:hover:not(:disabled) { transform: translateY(-1px); }
.wt-btn:active:not(:disabled) { transform: translateY(0); }
.wt-btn:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(199, 149, 68, 0.35); }
.wt-btn:disabled { opacity: 0.6; cursor: not-allowed; }

.wt-btn--primary { color: #fff; background: #c79544; box-shadow: 0 8px 18px -8px rgba(166, 122, 54, 0.7); }
.wt-btn--primary:hover:not(:disabled) { background: #b3843a; box-shadow: 0 12px 22px -10px rgba(166, 122, 54, 0.75); }
.wt-btn--dark { color: #fff; background: #1c1917; box-shadow: 0 8px 18px -10px rgba(28, 25, 23, 0.6); }
.wt-btn--dark:hover:not(:disabled) { background: #c79544; }
.wt-btn--ghost { color: #44403c; background: rgba(255, 255, 255, 0.45); border-color: rgba(168, 162, 158, 0.45); }
.wt-btn--ghost:hover:not(:disabled) { color: #8a682c; background: rgba(255, 255, 255, 0.8); border-color: rgba(199, 149, 68, 0.6); }
.wt-btn--outline { color: #a67a36; background: rgba(255, 255, 255, 0.3); border-color: rgba(199, 149, 68, 0.6); }
.wt-btn--outline:hover:not(:disabled) { background: rgba(255, 255, 255, 0.65); border-color: #c79544; }

.wt-btn--sm { min-height: 2.25rem; padding: 0.45rem 0.95rem; font-size: 0.75rem; border-radius: 0.75rem; }
.wt-btn--lg { min-height: 3.25rem; padding: 0.9rem 1.75rem; font-size: 0.95rem; }
.wt-btn--block { width: 100%; }
.wt-btn-meta { font-weight: 500; opacity: 0.9; padding-left: 0.65rem; border-left: 1px solid rgba(255, 255, 255, 0.45); }

/* Joined input + button (final invitation link) */
.wt-input-group { display: flex; border-radius: 0.8rem; overflow: hidden; border: 1px solid rgba(168, 162, 158, 0.6); background: #fff; }
.wt-input-group input { flex: 1; min-width: 0; padding: 0.6rem 0.9rem; font-size: 0.8rem; color: #44403c; background: transparent; border: 0; outline: none; }
.wt-input-group .wt-btn { border-radius: 0; box-shadow: none; transform: none; min-height: auto; }

/* ---------------------------------------------------------------
   Layout helpers (responsive spacing that the compiled Tailwind lacks)
   --------------------------------------------------------------- */
.wt-subnav { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 0.5rem 0.6rem; }
.wt-step-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem; padding-top: 0.75rem; }
.wt-step-footer .wt-btn--primary { margin-left: auto; }
.wt-card-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem; }
.wt-toggle-card { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.25rem; border-radius: 1rem; background: rgba(255, 255, 255, 0.3); }
@media (min-width: 640px) { .wt-toggle-card { padding: 1.5rem; } }
@media (max-width: 639px) { .wt-hide-xs { display: none !important; } }

/* Final step actions */
.wt-final-actions { max-width: 28rem; margin: 0 auto; display: grid; gap: 0.75rem; }
.wt-final-actions__row { display: grid; grid-template-columns: 1fr; gap: 0.75rem; }
@media (min-width: 640px) { .wt-final-actions__row { grid-template-columns: 1fr 1fr; } }
.wt-final-note { margin: -0.25rem 0 0.25rem; font-size: 0.75rem; color: #78716c; }
.wt-final-note:empty { display: none; }

/* Invitation link suggestions */
.wt-url-option { display: flex; align-items: center; gap: 0.75rem; padding: 0.7rem 0.9rem; border-radius: 0.8rem; border: 1px solid rgba(199, 149, 68, 0.2); background: rgba(255, 255, 255, 0.4); cursor: pointer; transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease; }
.wt-url-option:hover { border-color: rgba(199, 149, 68, 0.5); background: rgba(255, 255, 255, 0.65); }
.wt-url-option:has(input:checked) { border-color: #c79544; background: rgba(255, 255, 255, 0.8); box-shadow: 0 4px 14px -6px rgba(199, 149, 68, 0.35); }
.wt-url-option input { width: 1rem; height: 1rem; flex-shrink: 0; accent-color: #c79544; }
.wt-url-option span { min-width: 0; font-size: 0.85rem; color: #57534e; overflow-wrap: anywhere; }
.wt-url-option b { color: #a67a36; font-weight: 600; }

/* ---------------------------------------------------------------
   Inline field validation (rules in en/js/walkthrough_core.js)
   --------------------------------------------------------------- */
.walkthrough-input.is-invalid { border-color: rgba(190, 18, 60, 0.55); background: rgba(255, 241, 242, 0.6); }
.walkthrough-input.is-invalid:focus { border-color: #be123c !important; box-shadow: 0 0 0 3px rgba(190, 18, 60, 0.14) !important; }
.wt-field-error { display: flex; align-items: flex-start; gap: 0.4rem; margin-top: 0.5rem; font-size: 12px; line-height: 1.45; font-weight: 500; color: #be123c; text-align: left; animation: wtErrorIn 0.2s ease-out both; }
.wt-field-error::before { content: '!'; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; width: 15px; height: 15px; margin-top: 1px; border-radius: 9999px; background: #be123c; color: #fff; font-size: 10px; font-weight: 700; }
.itinerary-row > .wt-field-error { grid-column: 1 / -1; margin: 0 0.35rem 0.15rem; }
.wt-group-invalid { box-shadow: 0 0 0 1px rgba(190, 18, 60, 0.4); border-radius: 1rem; }
@keyframes wtErrorIn { from { opacity: 0; transform: translateY(-3px); } to { opacity: 1; transform: none; } }

/* Locked plan notice (Step 1, published invitations only) — replaces the package
   picker entirely so there is nothing to choose from; see /en/upgrade/<slug>
   (en/upgrade_page.php) */
.wt-locked-plan {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1.25rem;
    padding: 1.5rem;
    border-radius: 1.25rem;
    background: rgba(255, 255, 255, 0.35);
    border: 1px solid rgba(199, 149, 68, 0.25);
}
.wt-locked-plan__icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    border-radius: 9999px;
    background: rgba(199, 149, 68, 0.12);
    color: #c79544;
}
.wt-locked-plan__icon svg { width: 1.5rem; height: 1.5rem; }
.wt-locked-plan__body { flex: 1 1 16rem; min-width: 0; }
.wt-locked-plan__eyebrow { display: block; font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.12em; color: #a67a36; margin-bottom: 0.2rem; }
.wt-locked-plan__title { font-family: 'Playfair Display', Georgia, serif; font-size: 1.25rem; font-weight: 700; color: #292524; }
.wt-locked-plan__meta { font-size: 0.8rem; color: #57534e; margin-top: 0.15rem; }
.wt-locked-plan__note { font-size: 0.75rem; color: #78716c; margin-top: 0.4rem; line-height: 1.5; }
.wt-locked-plan__cta { flex-shrink: 0; white-space: nowrap; }

/* Guestbook step preview */
.wt-wish { padding: 0.9rem 1rem; border-radius: 0.9rem; background: rgba(255, 255, 255, 0.55); border: 1px solid rgba(199, 149, 68, 0.18); transition: opacity 0.3s ease, filter 0.3s ease; }
.wt-wish-head { display: flex; justify-content: space-between; align-items: baseline; gap: 0.75rem; margin-bottom: 0.2rem; }
.wt-wish-name { font-size: 0.875rem; font-weight: 700; color: #292524; }
.wt-wish-date { font-size: 10px; text-transform: uppercase; letter-spacing: 0.08em; color: #a8a29e; }
.wt-guestbook-preview.is-off .wt-wish { opacity: 0.35; filter: grayscale(1); }
.wt-guestbook-off-note { display: none; }
.wt-guestbook-preview.is-off .wt-guestbook-off-note { display: block; }
