/* Invitation theme preview — scoped so the current site remains untouched by default. */
html.theme-invitation {
    --invite-paper: #f7efe5;
    --invite-paper-soft: #fbf6ef;
    --invite-ink: #4b3a32;
    --invite-muted: #8a7468;
    --invite-terracotta: #a34f32;
    --invite-terracotta-dark: #7f3a25;
    --invite-line: #dec9b8;
    --invite-shadow: 0 18px 50px rgba(84, 58, 45, 0.10);
}

html.theme-invitation body {
    color: var(--invite-ink);
    background-color: var(--invite-paper);
    background-image:
        radial-gradient(circle at 12% 18%, rgba(163,79,50,.035) 0 1px, transparent 1.5px),
        radial-gradient(circle at 78% 32%, rgba(75,58,50,.025) 0 1px, transparent 1.5px),
        radial-gradient(circle at 35% 77%, rgba(163,79,50,.025) 0 1px, transparent 1.5px);
    background-size: 18px 18px, 23px 23px, 29px 29px;
    font-family: "Avenir Next", "Segoe UI", Arial, sans-serif;
}

html.theme-invitation body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -1;
    background: linear-gradient(180deg, rgba(255,255,255,.28), transparent 26rem);
}

html.theme-invitation .navbar {
    background: rgba(247, 239, 229, .96) !important;
    border-bottom: 1px solid var(--invite-line);
    box-shadow: 0 5px 25px rgba(84, 58, 45, .06);
    backdrop-filter: blur(10px);
}

html.theme-invitation .navbar-brand {
    color: var(--invite-terracotta) !important;
    font-size: 1.85rem;
    font-weight: 700;
    letter-spacing: .01em;
}

html.theme-invitation .navbar-brand::before,
html.theme-invitation .navbar-brand::after {
    content: "·";
    font-family: Georgia, serif;
    margin: 0 .32rem;
    opacity: .55;
}

html.theme-invitation .navbar-brand {
    font-family: 'Dancing Script', cursive !important;
}

html.theme-invitation .navbar-dark .navbar-nav .nav-link,
html.theme-invitation .navbar .nav-link {
    color: var(--invite-ink) !important;
    font-weight: 600;
}

html.theme-invitation .navbar .nav-link:hover,
html.theme-invitation .navbar .nav-link:focus {
    color: var(--invite-terracotta) !important;
}

html.theme-invitation .navbar-toggler {
    border-color: var(--invite-line);
}

html.theme-invitation .navbar-toggler-icon {
    filter: invert(29%) sepia(15%) saturate(936%) hue-rotate(338deg) brightness(88%);
}

html.theme-invitation .container.mt-4 {
    max-width: 1180px;
}

html.theme-invitation h1,
html.theme-invitation h2,
html.theme-invitation h3,
html.theme-invitation h4,
html.theme-invitation h5 {
    color: var(--invite-ink);
}

html.theme-invitation h1,
html.theme-invitation .display-1,
html.theme-invitation .display-2,
html.theme-invitation .display-3,
html.theme-invitation .display-4 {
    font-family: 'Dancing Script', cursive !important;
    color: var(--invite-terracotta) !important;
    font-weight: 700;
    line-height: 1.05;
}

html.theme-invitation .display-1 {
    font-size: clamp(4rem, 9vw, 7.5rem);
}

html.theme-invitation .lead {
    color: var(--invite-muted) !important;
}

html.theme-invitation hr {
    border: 0;
    height: 1px;
    opacity: 1;
    background: linear-gradient(90deg, transparent, var(--invite-terracotta), transparent);
}

html.theme-invitation .card {
    background: rgba(251, 246, 239, .92) !important;
    border: 1px solid rgba(222, 201, 184, .85) !important;
    border-radius: 22px !important;
    box-shadow: var(--invite-shadow) !important;
}

html.theme-invitation .card-header {
    background: transparent !important;
    color: var(--invite-terracotta) !important;
    border-bottom: 1px solid var(--invite-line) !important;
    font-family: Georgia, serif;
    font-weight: 700;
}

html.theme-invitation .btn-primary,
html.theme-invitation .btn-dark {
    background: var(--invite-terracotta) !important;
    border-color: var(--invite-terracotta) !important;
    color: #fff !important;
    border-radius: 999px !important;
    padding-left: 1.35rem;
    padding-right: 1.35rem;
    box-shadow: 0 8px 22px rgba(163,79,50,.18) !important;
}

html.theme-invitation .btn-primary:hover,
html.theme-invitation .btn-dark:hover {
    background: var(--invite-terracotta-dark) !important;
    border-color: var(--invite-terracotta-dark) !important;
}

html.theme-invitation .btn-outline-primary,
html.theme-invitation .btn-outline-dark,
html.theme-invitation .btn-outline-secondary {
    border-color: var(--invite-terracotta) !important;
    color: var(--invite-terracotta) !important;
    border-radius: 999px !important;
}

html.theme-invitation .btn-outline-primary:hover,
html.theme-invitation .btn-outline-dark:hover,
html.theme-invitation .btn-outline-secondary:hover {
    background: var(--invite-terracotta) !important;
    color: #fff !important;
}

html.theme-invitation .form-control,
html.theme-invitation .form-select,
html.theme-invitation textarea {
    background: rgba(255,255,255,.62) !important;
    border: 1px solid var(--invite-line) !important;
    border-radius: 14px !important;
    color: var(--invite-ink) !important;
}

html.theme-invitation .form-control:focus,
html.theme-invitation .form-select:focus,
html.theme-invitation textarea:focus {
    border-color: var(--invite-terracotta) !important;
    box-shadow: 0 0 0 .2rem rgba(163,79,50,.12) !important;
}

html.theme-invitation .alert-success,
html.theme-invitation .alert-info,
html.theme-invitation .alert-warning {
    background: rgba(255,255,255,.5) !important;
    border-color: var(--invite-line) !important;
    color: var(--invite-ink) !important;
    border-radius: 16px;
}

html.theme-invitation .text-primary,
html.theme-invitation a:not(.btn):not(.nav-link) {
    color: var(--invite-terracotta) !important;
}

html.theme-invitation .bg-primary,
html.theme-invitation .badge.bg-primary {
    background-color: var(--invite-terracotta) !important;
}

/* Homepage: turn the existing hero into a printed invitation-like header. */
html.theme-invitation body:not(.admin-shell) .row.justify-content-center.text-center.mb-5:first-child {
    position: relative;
    margin-top: .25rem;
    margin-bottom: 1.5rem !important;
    padding: 1rem 1rem 1.75rem;
}

html.theme-invitation body:not(.admin-shell) .row.justify-content-center.text-center.mb-5:first-child::before {
    content: "♥";
    display: block;
    flex: 0 0 100%;
    width: 100%;
    text-align: center;
    color: var(--invite-terracotta);
    font-size: 1.1rem;
    margin-bottom: 1.1rem;
    opacity: .75;
}

html.theme-invitation body:not(.admin-shell) .row.justify-content-center.text-center.mb-5:first-child::after {
    content: "";
    display: block;
    flex: 0 0 120px;
    width: 120px;
    height: 1px;
    margin: 1.25rem auto 0;
    background: var(--invite-terracotta);
    opacity: .5;
}

html.theme-invitation body:not(.admin-shell) .row.justify-content-center.text-center.mb-5:first-child .lead {
    text-transform: uppercase;
    letter-spacing: .18em;
    font-size: .92rem;
}

/* Story / content cards feel like layered stationery instead of app panels. */
html.theme-invitation body:not(.admin-shell) .shadow-lg,
html.theme-invitation body:not(.admin-shell) .shadow-sm {
    box-shadow: var(--invite-shadow) !important;
}

html.theme-invitation body:not(.admin-shell) .card-body {
    padding: clamp(1.4rem, 3vw, 2.3rem);
}

html.theme-invitation body:not(.admin-shell) .card i.fs-1,
html.theme-invitation body:not(.admin-shell) .card i[style*="font-size: 3rem"] {
    color: var(--invite-terracotta) !important;
}

/* RSVP: keep all behavior, soften visual hierarchy. */
html.theme-invitation body:not(.admin-shell) form .form-label.fw-bold {
    color: var(--invite-ink);
    letter-spacing: .01em;
}

html.theme-invitation body:not(.admin-shell) .input-group-lg > .form-control,
html.theme-invitation body:not(.admin-shell) .input-group-lg > .btn {
    min-height: 54px;
}

/* Personal planning timeline */
html.theme-invitation .timeline::before {
    background-color: var(--invite-line) !important;
}

html.theme-invitation .timeline-icon {
    background: var(--invite-terracotta) !important;
    border-color: var(--invite-paper-soft) !important;
}

html.theme-invitation .timeline-content {
    background: rgba(255,255,255,.32);
    border: 1px solid rgba(222,201,184,.65);
    border-radius: 16px !important;
}

html.theme-invitation .timeline-title {
    color: var(--invite-terracotta) !important;
    font-family: Georgia, serif;
}

html.theme-invitation footer {
    background: transparent !important;
    border-top: 1px solid var(--invite-line) !important;
}

html.theme-invitation #translate-launcher,
html.theme-invitation #chatbot-launcher {
    background: var(--invite-paper-soft) !important;
    color: var(--invite-terracotta) !important;
    border-color: var(--invite-terracotta) !important;
    box-shadow: 0 8px 25px rgba(84,58,45,.12) !important;
}

html.theme-invitation #chatbot-window {
    border-color: var(--invite-line) !important;
    border-radius: 20px !important;
}

html.theme-invitation #chatbot-window > div:first-child {
    background: var(--invite-terracotta) !important;
}

#invitation-theme-preview-bar {
    position: fixed;
    left: 50%;
    bottom: 18px;
    transform: translateX(-50%);
    z-index: 1000001;
    background: #4b3a32;
    color: #fff;
    border-radius: 999px;
    box-shadow: 0 10px 35px rgba(0,0,0,.2);
    padding: 8px 10px 8px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: .88rem;
}

#invitation-theme-preview-bar a {
    color: #4b3a32 !important;
    background: #f7efe5;
    text-decoration: none;
    border-radius: 999px;
    padding: 6px 11px;
    font-weight: 700;
}

@media (max-width: 767.98px) {
    html.theme-invitation .navbar-brand { font-size: 1.55rem; }
    html.theme-invitation body:not(.admin-shell) .row.justify-content-center.text-center.mb-5:first-child {
        padding-top: 2.2rem;
        padding-bottom: 2.6rem;
        margin-bottom: 2.4rem !important;
    }
    html.theme-invitation .display-1 { font-size: clamp(3.3rem, 17vw, 5rem); }
    html.theme-invitation .card { border-radius: 18px !important; }
    #invitation-theme-preview-bar {
        bottom: 10px;
        width: calc(100% - 24px);
        justify-content: space-between;
    }
}
