/**
 * Template 06: Botanical Floral & Romantic
 * Soft sage green, pastel accents, delicate serif and calligraphy typography
 *
 * @package LuhurianDigital
 */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: #f1f5f9;
    font-family: var(--inv-font-body, 'Nunito Sans', sans-serif);
    color: var(--inv-text, #334155);
    display: flex;
    justify-content: center;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    line-height: 1.6;
}

.invitation-wrapper {
    width: 100%;
    max-width: 480px;
    background: var(--inv-background, #fefce8);
    min-height: 100vh;
    position: relative;
    box-shadow: 0 25px 60px -15px rgba(5, 150, 105, 0.15);
    overflow-x: hidden;
    padding-bottom: 80px;
    border: 1px solid #fef08a;
}

.cover-overlay {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 480px;
    height: 100%;
    background: linear-gradient(180deg, rgba(6, 78, 59, 0.8) 0%, rgba(6, 78, 59, 0.95) 100%), var(--cover-bg, #064e3b);
    background-size: cover;
    background-position: center;
    color: #ffffff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 36px 24px;
    z-index: 9999;
    transition: opacity 0.7s ease, visibility 0.7s ease;
}

.cover-overlay.opened {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.cover-tag {
    font-family: var(--inv-font-heading);
    font-size: 16px;
    letter-spacing: 2px;
    color: #a7f3d0;
    margin-bottom: 12px;
}

.cover-couple {
    font-family: var(--inv-font-heading);
    font-size: 42px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 12px;
    line-height: 1.2;
}

.cover-guest-box {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 16px;
    padding: 18px 24px;
    margin: 24px 0 32px;
    width: 100%;
    max-width: 320px;
    backdrop-filter: blur(8px);
}

.cover-guest-label {
    font-size: 11px;
    color: #e2e8f0;
    margin-bottom: 4px;
}

.cover-guest-name {
    font-size: 18px;
    font-weight: 700;
    color: #ffffff;
}

.cover-btn {
    background: #059669;
    color: #ffffff;
    border: none;
    padding: 14px 32px;
    font-size: 14px;
    font-weight: 700;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(5, 150, 105, 0.4);
    min-height: 48px;
}

.section {
    padding: 56px 24px;
    text-align: center;
    border-bottom: 1px solid rgba(5, 150, 105, 0.08);
}

.section-tag {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--inv-primary, #059669);
    margin-bottom: 6px;
    display: inline-block;
}

.section-title {
    font-family: var(--inv-font-heading);
    font-size: 32px;
    color: var(--inv-primary, #059669);
    margin-bottom: 16px;
}

.couple-card {
    background: #ffffff;
    border: 1px solid #d1fae5;
    border-radius: 20px;
    padding: 26px 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(5, 150, 105, 0.05);
}

.couple-avatar {
    width: 125px;
    height: 125px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 16px;
    border: 3px solid var(--inv-primary, #059669);
    display: block;
}

.event-card {
    background: #ffffff;
    border: 1px solid #d1fae5;
    border-radius: 16px;
    padding: 22px;
    margin-bottom: 16px;
    text-align: left;
    box-shadow: 0 4px 15px rgba(5, 150, 105, 0.05);
}

.event-badge {
    background: #ecfdf5;
    color: var(--inv-primary, #059669);
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 6px;
    margin-bottom: 10px;
    display: inline-block;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.gallery-item {
    aspect-ratio: 1/1;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.gallery-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.gallery-item:hover .gallery-img {
    transform: scale(1.05);
}

.gift-card {
    background: #ffffff;
    border: 1px solid #d1fae5;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 14px;
    text-align: left;
}

.gift-number {
    font-family: monospace;
    font-size: 18px;
    font-weight: 700;
    color: var(--inv-primary, #059669);
    margin: 6px 0;
}

.gift-copy-btn {
    width: 100%;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: var(--inv-primary, #059669);
    padding: 10px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    margin-top: 10px;
    min-height: 44px;
}

.gift-copy-btn.copied {
    background: #059669;
    color: #fff;
}

/* RSVP & Wishes in Botanical Floral Theme */
.rsvp-card {
    background: #ffffff;
    border: 1px solid #d1fae5;
    border-radius: 18px;
    padding: 24px 20px;
    text-align: left;
    box-shadow: 0 4px 15px rgba(5, 150, 105, 0.06);
}

.rsvp-alert {
    padding: 12px 14px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 16px;
    font-weight: 600;
}
.rsvp-alert.success { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.rsvp-alert.error { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }

.rsvp-existing-notice {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 8px;
    padding: 12px;
    font-size: 13px;
    color: #166534;
    margin-bottom: 16px;
}

.rsvp-form-group { margin-bottom: 16px; }
.rsvp-label { display: block; font-size: 12px; font-weight: 700; color: #064e3b; margin-bottom: 6px; }
.rsvp-label .required { color: #ef4444; }

.rsvp-input, .rsvp-select, .rsvp-textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1.5px solid #a7f3d0;
    background: #ffffff;
    color: #0f172a;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    box-sizing: border-box;
}
.rsvp-input:focus, .rsvp-select:focus, .rsvp-textarea:focus {
    outline: none;
    border-color: var(--inv-primary, #059669);
    box-shadow: 0 0 0 2px rgba(5, 150, 105, 0.2);
}

.rsvp-attendance-options { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.attendance-radio-label { cursor: pointer; position: relative; }
.attendance-radio-label input[type="radio"] { position: absolute; opacity: 0; }
.attendance-pill {
    display: block;
    padding: 10px;
    text-align: center;
    border: 1.5px solid #d1fae5;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    color: #065f46;
    background: #f0fdf4;
    transition: all 0.2s;
}
.attendance-radio-label input[type="radio"]:checked + .attendance-pill {
    border-color: var(--inv-primary, #059669);
    background: #059669;
    color: #ffffff;
}
.attendance-radio-label input[type="radio"]:checked + .attendance-pill.declined {
    border-color: #ef4444;
    background: #fef2f2;
    color: #991b1b;
}

.rsvp-submit-btn {
    width: 100%;
    background: var(--inv-primary, #059669);
    color: #ffffff;
    border: none;
    padding: 12px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    min-height: 44px;
}
.rsvp-submit-btn:hover { filter: brightness(1.08); }
.rsvp-submit-btn:disabled { opacity: 0.5; }

/* Wishes */
.wishes-counter {
    background: #d1fae5;
    color: var(--inv-primary, #059669);
    font-size: 12px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 50px;
    margin-left: 6px;
    vertical-align: middle;
}
.wishes-list { display: flex; flex-direction: column; gap: 12px; max-height: 420px; overflow-y: auto; text-align: left; }
.wishes-empty { text-align: center; color: #64748b; font-size: 13px; padding: 20px; }
.wish-item {
    display: flex;
    gap: 12px;
    background: #ffffff;
    border: 1px solid #d1fae5;
    border-radius: 12px;
    padding: 14px;
}
.wish-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #059669;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 12px;
    flex-shrink: 0;
}
.wish-content { flex: 1; min-width: 0; }
.wish-header { display: flex; justify-content: space-between; align-items: center; }
.wish-author { font-size: 13px; font-weight: 700; color: #064e3b; }
.wish-badge { font-size: 10px; padding: 2px 6px; border-radius: 4px; font-weight: 700; }
.wish-badge.attending { background: #ecfdf5; color: #059669; }
.wish-badge.declined { background: #fef2f2; color: #dc2626; }
.wish-time { font-size: 11px; color: #94a3b8; margin-bottom: 4px; }
.wish-text { font-size: 13px; color: #334155; line-height: 1.5; }
.load-more-btn {
    background: #f0fdf4;
    color: #065f46;
    border: 1px solid #a7f3d0;
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 12px;
    cursor: pointer;
    margin-top: 14px;
}

.music-btn {
    position: fixed;
    bottom: 24px;
    right: calc(50% - 220px);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #059669;
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    box-shadow: 0 4px 15px rgba(5, 150, 105, 0.4);
}

@media (max-width: 480px) {
    .music-btn { right: 20px; bottom: 20px; }
}

/* Countdown Botanical Theme */
.countdown-container {
    margin: 20px auto 0;
    max-width: 360px;
}
.countdown-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}
.countdown-box {
    background: #ffffff;
    border: 1px solid #d1fae5;
    border-radius: 14px;
    padding: 12px 6px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.05);
}
.countdown-val {
    font-family: var(--inv-font-heading);
    font-size: 26px;
    font-weight: 700;
    color: #065f46;
    line-height: 1.1;
}
.countdown-lbl {
    font-size: 11px;
    color: #059669;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 4px;
    font-weight: 600;
}
.countdown-passed {
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #065f46;
    padding: 12px;
    border-radius: 8px;
    font-size: 13px;
    margin-top: 14px;
}

/* Story Timeline Botanical */
.story-timeline {
    position: relative;
    max-width: 400px;
    margin: 24px auto 0;
    text-align: left;
    padding-left: 24px;
}
.story-timeline:not(.single-story-layout)::before {
    content: '';
    position: absolute;
    top: 12px;
    bottom: 12px;
    left: 8px;
    width: 2px;
    background: #a7f3d0;
}
.story-card {
    position: relative;
    background: #ffffff;
    border: 1px solid #d1fae5;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(5, 150, 105, 0.05);
}
.story-timeline:not(.single-story-layout) .story-card::before {
    content: '';
    position: absolute;
    top: 24px;
    left: -20px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #059669;
    box-shadow: 0 0 0 3px #d1fae5;
}
.story-date {
    font-size: 12px;
    font-weight: 700;
    color: #059669;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 4px;
}
.story-title {
    font-family: var(--inv-font-heading);
    font-size: 20px;
    color: #064e3b;
    margin-bottom: 8px;
}
.story-desc {
    font-size: 13px;
    color: #475569;
    line-height: 1.6;
}
.story-photo {
    width: 100%;
    max-height: 220px;
    object-fit: cover;
    border-radius: 10px;
    margin-top: 12px;
    border: 1px solid #e2e8f0;
}

/* Event Map Button & Share Button */
.event-map-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 12px;
    color: #059669;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.2s;
    min-height: 40px;
}
.event-map-btn:hover {
    background: #d1fae5;
    transform: translateY(-1px);
}
.share-invitation-btn {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
    padding: 12px 24px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
    min-height: 44px;
}
.share-invitation-btn:hover {
    background: #059669;
    color: #ffffff;
}

@media (prefers-reduced-motion: reduce) {
    * { animation: none !important; transition: none !important; }
}
