@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;0,700;1,400&family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

/* --- Base Reset & Typography --- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--inv-bg);
    color: var(--inv-base);
    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    font-size: 15px;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* Serif Headings (Premium feel) */
.font-serif {
    font-family: 'Cormorant Garamond', Georgia, serif;
}

h1, h2, h3, .rsvp-couple-name {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-weight: 600;
}

/* --- Layout --- */
.rsvp-header {
    background-color: var(--inv-accent);
    background-image: radial-gradient(circle at 10% 20%, rgba(255, 255, 255, 0.05) 0%, transparent 40%),
                      radial-gradient(circle at 90% 80%, rgba(0, 0, 0, 0.03) 0%, transparent 50%);
    padding: 70px 24px 130px;
    text-align: center;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Elegant line dividers in header */
.rsvp-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: linear-gradient(to top, var(--inv-bg), transparent);
    pointer-events: none;
}

.rsvp-header .event-name {
    font-size: 1rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--btn-color);
    opacity: 0.85;
    margin-bottom: 8px;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

.rsvp-header .couple-name {
    font-size: clamp(2.4rem, 6vw, 3.8rem);
    line-height: 1.1;
    color: var(--btn-color);
    font-weight: 500;
    margin-bottom: 8px;
}

.rsvp-main {
    max-width: 520px;
    width: 100%;
    margin: -80px auto 0;
    padding: 0 20px 60px;
    position: relative;
    z-index: 10;
}

.rsvp-card {
    background-color: var(--menu-bg);
    border: 1px solid var(--inv-border);
    border-radius: 24px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.03), 
                0 5px 15px rgba(0, 0, 0, 0.02);
    padding: 40px 32px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

@media (max-width: 576px) {
    .rsvp-card {
        padding: 28px 20px;
        border-radius: 20px;
    }
    .rsvp-header {
        padding: 55px 16px 110px;
    }
}

/* --- Form Fields & Styled Elements --- */
.form-group {
    margin-bottom: 24px;
}

.form-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--menu-inactive);
    margin-bottom: 8px;
}

.form-control, .form-select {
    width: 100%;
    height: 50px;
    padding: 12px 18px;
    font-size: 0.95rem;
    font-family: inherit;
    border-radius: 12px;
    border: 1.5px solid var(--inv-border);
    background-color: var(--menu-bg);
    color: var(--inv-base);
    transition: all 0.2s ease;
}

.form-control:focus, .form-select:focus {
    outline: none;
    border-color: var(--inv-accent);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--inv-accent) 15%, transparent);
}

textarea.form-control {
    height: auto;
    min-height: 100px;
    resize: vertical;
}

/* Readonly fields styling */
.readonly-field {
    background-color: color-mix(in srgb, var(--inv-bg) 70%, transparent);
    border: 1px dashed var(--inv-border);
    color: var(--inv-base);
    border-radius: 12px;
    padding: 14px 18px;
    font-size: 0.95rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    user-select: none;
}

/* Elegant Alert/Info Box */
.note-box {
    background-color: color-mix(in srgb, var(--inv-accent) 7%, var(--menu-bg));
    border-left: 4px solid var(--inv-accent);
    border-radius: 4px 16px 16px 4px;
    padding: 16px 20px;
    font-size: 0.92rem;
    line-height: 1.5;
    color: var(--inv-base);
    font-weight: 400;
    margin-bottom: 28px;
}

/* --- Custom Interactive Radio Cards --- */
.radio-cards {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.custom-radio-card {
    position: relative;
    border: 2px solid var(--inv-border);
    border-radius: 16px;
    padding: 18px 20px;
    cursor: pointer;
    background-color: var(--menu-bg);
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
}

.custom-radio-card:hover {
    border-color: color-mix(in srgb, var(--inv-accent) 50%, var(--inv-border));
    transform: translateY(-1px);
}

.custom-radio-card.active {
    border-color: var(--inv-accent);
    background-color: color-mix(in srgb, var(--inv-accent) 6%, var(--menu-bg));
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
}

.radio-card-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding-right: 12px;
}

.radio-card-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--inv-base);
}

.radio-card-circle {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid var(--inv-border);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.25s ease;
}

.custom-radio-card:hover .radio-card-circle {
    border-color: var(--inv-accent);
}

.custom-radio-card.active .radio-card-circle {
    border-color: var(--inv-accent);
    background-color: var(--inv-accent);
}

.radio-card-circle::after {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--btn-color);
    transform: scale(0);
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.custom-radio-card.active .radio-card-circle::after {
    transform: scale(1);
}

/* --- Custom Segmented Toggles --- */
.toggle-group {
    display: flex;
    background-color: color-mix(in srgb, var(--inv-bg) 60%, transparent);
    padding: 6px;
    border-radius: 14px;
    border: 1px solid var(--inv-border);
    gap: 6px;
}

.toggle-btn {
    flex: 1;
    height: 42px;
    border: none;
    background: none;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    color: var(--menu-inactive);
    transition: all 0.25s ease;
}

.toggle-btn.active {
    background-color: var(--inv-accent);
    color: var(--btn-color);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

/* --- Pax Selector Circular Buttons --- */
.pax-selector-container {
    margin-bottom: 20px;
}

.pax-btn-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 6px;
}

.pax-btn {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    border: 1.5px solid var(--inv-border);
    background-color: var(--menu-bg);
    color: var(--inv-base);
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pax-btn:hover {
    border-color: var(--inv-accent);
    color: var(--inv-accent);
    transform: scale(1.05);
}

.pax-btn.pax-active {
    background-color: var(--inv-accent);
    border-color: var(--inv-accent);
    color: var(--btn-color);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

/* --- Submit Button --- */
.btn-rsvp {
    background-color: var(--inv-accent);
    color: var(--btn-color);
    border: none;
    width: 100%;
    height: 52px;
    border-radius: 14px;
    font-size: 1rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px color-mix(in srgb, var(--inv-accent) 30%, transparent);
}

.btn-rsvp:hover:not(:disabled) {
    background-color: var(--btn-bg-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px color-mix(in srgb, var(--inv-accent) 40%, transparent);
}

.btn-rsvp:active:not(:disabled) {
    transform: translateY(1px);
}

.btn-rsvp:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    box-shadow: none;
}

/* --- Transitions for dynamic visibility --- */
.collapse-section {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), 
                opacity 0.3s ease;
}

.collapse-section.show {
    max-height: 1200px;
    opacity: 1;
}

/* Divider styling */
hr.divider-line {
    border: 0;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--inv-border) 20%, var(--inv-border) 80%, transparent);
    margin: 24px 0;
}

/* --- Language Toggle --- */
.lang-toggle {
    display: flex;
    gap: 6px;
    justify-content: flex-end;
    margin-bottom: 24px;
}

.lang-btn {
    background: none;
    border: 1px solid var(--inv-border);
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--menu-inactive);
    cursor: pointer;
    transition: all 0.2s ease;
}

.lang-btn:hover {
    color: var(--inv-accent);
    border-color: var(--inv-accent);
}

.lang-btn.active {
    border-color: var(--inv-accent);
    color: var(--inv-accent);
    background-color: color-mix(in srgb, var(--inv-accent) 6%, transparent);
}

/* --- Footer & Watermark --- */
.rsvp-footer {
    margin-top: 30px;
    text-align: center;
}

.rsvp-logo {
    height: 24px;
    filter: var(--logo-filter);
    transition: opacity 0.3s ease;
}

.rsvp-copyright {
    font-size: 0.75rem;
    color: var(--menu-inactive);
    margin-top: 8px;
}

/* --- Confirmation & Success Layouts --- */
.status-icon-wrapper {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin-bottom: 24px;
    animation: scaleIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1),
               pulse 2s ease-in-out 0.5s infinite;
}

.status-icon-wrapper.success {
    background-color: #e8f5e9;
    color: #2e7d32;
}

.status-icon-wrapper.decline {
    background-color: #ffebee;
    color: #c62828;
}

.status-icon-wrapper.info {
    background-color: color-mix(in srgb, var(--inv-accent) 12%, transparent);
    color: var(--inv-accent);
}

.status-icon {
    font-size: 2.2rem;
}

.btn-wa-help {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background-color: #25D366;
    color: white;
    text-decoration: none;
    border-radius: 12px;
    padding: 12px 24px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.25s ease;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.2);
}

.btn-wa-help:hover {
    background-color: #1ebe5d;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(37, 211, 102, 0.3);
}

/* Animations */
@keyframes scaleIn {
    0% { transform: scale(0); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes fadeIn {
    0% { opacity: 0; transform: translateY(10px); }
    100% { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
    0%   { box-shadow: 0 0 0 0 currentColor; }
    70%  { box-shadow: 0 0 0 12px rgba(0,0,0,0); }
    100% { box-shadow: 0 0 0 0 rgba(0,0,0,0); }
}

.fade-in-up {
    animation: fadeIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
