/* ==========================================================================
   RSVP & WISHES (DONGA) - UTARY HERITAGE CLASSIC EDITION
   - Harmonized Theme: Coklat Elegan #44291f + Emas Antik #CCBA82
   - Buttons: Heritage Classic Pill & Circular Medallions (No Generic Rectangles)
   - Vertical Scrollable 10 Comments per Page + Show More + Pagination
   - Pop-up Modal Form + Checkmark Success + Instant Prepend
   ========================================================================== */

#realtime-comments {
    width: 100%;
    margin-top: 4px;
}

/* Ringkasan jumlah doa di atas list */
.rsvp-summary-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    padding: 0 4px 6px;
    border-bottom: 1px solid rgba(204, 186, 130, 0.25);
    font-family: var(--utary-font-secondary, "Ovo", serif);
    font-size: 12.5px;
    color: rgba(204, 186, 130, 0.88);
}

.rsvp-summary-count {
    font-weight: 600;
    letter-spacing: 0.3px;
}

/* Container Scroll Vertikal untuk 10 Komentar */
#realtime-comments ul.cui-container-comments {
    opacity: 1;
    transition: opacity 0.25s ease-in-out;
    list-style: none !important;
    padding: 2px 6px 4px 2px !important;
    margin: 0 !important;
    max-height: 450px;
    overflow-y: auto;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

#realtime-comments ul.cui-container-comments.fade-out {
    opacity: 0.45 !important;
}

/* Custom Scrollbar Tipis Keemasan */
#realtime-comments ul.cui-container-comments::-webkit-scrollbar {
    width: 5px;
}

#realtime-comments ul.cui-container-comments::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.25);
    border-radius: 99px;
}

#realtime-comments ul.cui-container-comments::-webkit-scrollbar-thumb {
    background: rgba(204, 186, 130, 0.48);
    border-radius: 99px;
}

#realtime-comments ul.cui-container-comments::-webkit-scrollbar-thumb:hover {
    background: rgba(204, 186, 130, 0.78);
}

/* Kartu Komentar Individual - Warna Coklat #44291f */
#realtime-comments li.rsvp-comment-item {
    padding: 13px 15px !important;
    margin-bottom: 10px !important;
    border: 1px solid rgba(204, 186, 130, 0.38) !important;
    background-color: var(--utary-secondary, #44291f) !important;
    border-radius: 10px !important;
    text-align: left !important;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    position: relative;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

#realtime-comments li.rsvp-comment-item:last-child {
    margin-bottom: 2px !important;
}

#realtime-comments li.rsvp-comment-item.just-added {
    border-color: #CCBA82 !important;
    box-shadow: 0 0 18px rgba(204, 186, 130, 0.38);
    animation: rsvpHighlightNew 2.2s ease-out;
}

@keyframes rsvpHighlightNew {
    0% {
        transform: translateY(-6px);
        box-shadow: 0 0 24px rgba(204, 186, 130, 0.65);
    }
    100% {
        transform: translateY(0);
        box-shadow: 0 0 0 rgba(204, 186, 130, 0);
    }
}

.rsvp-comment-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 6px;
    flex-wrap: wrap;
}

.rsvp-comment-author {
    font-family: var(--utary-font-secondary, "Ovo", serif);
    font-weight: 700;
    color: #CCBA82;
    font-size: 14.5px;
    line-height: 1.3;
    word-break: break-word;
}

.rsvp-comment-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-family: var(--utary-font-secondary, "Ovo", sans-serif);
    font-size: 11px;
    font-weight: 600;
    padding: 2px 9px;
    border-radius: 999px;
    border: 1px solid rgba(204, 186, 130, 0.6);
    color: #f5eedc;
    background: rgba(204, 186, 130, 0.18);
    white-space: nowrap;
    flex-shrink: 0;
}

.rsvp-comment-badge.tidak-hadir {
    opacity: 0.85;
    border-color: rgba(245, 238, 220, 0.32);
    background: rgba(0, 0, 0, 0.3);
    color: rgba(245, 238, 220, 0.85);
}

.rsvp-comment-text {
    font-family: var(--utary-font-secondary, "Ovo", sans-serif);
    color: #f5eedc;
    font-size: 13.5px;
    line-height: 1.55;
    margin: 4px 0 4px;
    white-space: pre-wrap;
    word-break: break-word;
}

.rsvp-readmore-btn {
    display: inline-block;
    background: none !important;
    border: none !important;
    padding: 0 !important;
    margin: 2px 0 4px !important;
    font-family: var(--utary-font-secondary, "Ovo", sans-serif);
    font-size: 12px;
    font-weight: 600;
    color: #CCBA82 !important;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: opacity 0.2s ease;
}

.rsvp-readmore-btn:hover {
    opacity: 0.8;
}

.rsvp-comment-date {
    font-family: var(--utary-font-secondary, "Ovo", sans-serif);
    font-size: 11px;
    color: rgba(245, 238, 220, 0.62);
    margin-top: 2px;
}

/* Pagination */
.realtime-pagination {
    display: flex;
    gap: 5px;
    margin-top: 12px;
    padding-top: 8px;
    border-top: 1px solid rgba(204, 186, 130, 0.22);
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

.realtime-pagination .page-btn,
.realtime-pagination .page-num-btn {
    padding: 5px 10px;
    cursor: pointer;
    color: #CCBA82 !important;
    background: rgba(204, 186, 130, 0.08) !important;
    border: 1px solid rgba(204, 186, 130, 0.35) !important;
    border-radius: 999px !important;
    font-family: var(--utary-font-secondary, "Ovo", sans-serif);
    font-size: 12px;
    line-height: 1.2;
    user-select: none;
    transition: all 0.2s ease;
}

.realtime-pagination .page-btn:hover:not(.disabled),
.realtime-pagination .page-num-btn:hover:not(.active) {
    background: rgba(204, 186, 130, 0.24) !important;
    border-color: #CCBA82 !important;
}

.realtime-pagination .page-num-btn.active {
    background: #CCBA82 !important;
    color: #44291f !important;
    border-color: #CCBA82 !important;
    font-weight: 700;
}

.realtime-pagination .page-btn.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

/* ==========================================================================
   POP-UP MODAL FORM KONFIRMASI & DOA - HERITAGE CLASSIC THEME
   ========================================================================== */
.rsvp-modal-overlay {
    position: fixed !important;
    inset: 0 !important;
    z-index: 99999 !important;
    background: rgba(18, 10, 7, 0.88) !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 16px !important;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.28s ease, visibility 0.28s ease;
}

.rsvp-modal-overlay.is-open {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
}

.rsvp-modal-card {
    position: relative !important;
    width: 100% !important;
    max-width: 420px !important;
    max-height: 90dvh !important;
    overflow-y: auto !important;
    background: #251711 !important;
    border: 1.5px solid #CCBA82 !important;
    border-radius: 18px !important;
    padding: 24px 20px 22px !important;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(204, 186, 130, 0.25) inset !important;
    color: #CCBA82 !important;
    transform: translateY(16px) scale(0.97);
    transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1) !important;
    text-align: left !important;
    box-sizing: border-box !important;
}

.rsvp-modal-overlay.is-open .rsvp-modal-card {
    transform: translateY(0) scale(1) !important;
}

/* Tombol Tutup Bulat Medallion Emas (Heritage Classic) */
button.rsvp-modal-close,
.rsvp-modal-close {
    position: absolute !important;
    top: 14px !important;
    right: 14px !important;
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    min-height: 36px !important;
    max-width: 36px !important;
    max-height: 36px !important;
    padding: 0 !important;
    margin: 0 !important;
    border-radius: 50% !important;
    border: 1.5px solid #CCBA82 !important;
    background: rgba(44, 25, 18, 0.92) !important;
    color: #CCBA82 !important;
    font-size: 16px !important;
    line-height: 1 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    transition: all 0.22s ease !important;
    outline: none !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5) !important;
    box-sizing: border-box !important;
}

button.rsvp-modal-close svg,
.rsvp-modal-close svg {
    display: block !important;
    stroke: #CCBA82 !important;
    transition: stroke 0.2s ease !important;
}

button.rsvp-modal-close:hover,
.rsvp-modal-close:hover {
    background: #CCBA82 !important;
    color: #2e201a !important;
    border-color: #CCBA82 !important;
    transform: scale(1.08) !important;
}

button.rsvp-modal-close:hover svg,
.rsvp-modal-close:hover svg {
    stroke: #2e201a !important;
}

.rsvp-modal-header {
    text-align: center;
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(204, 186, 130, 0.25);
}

.rsvp-modal-title {
    font-family: var(--utary-font, "Gloock", serif);
    font-size: 26px;
    font-weight: 400;
    color: #CCBA82;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0;
    line-height: 1.15;
}

.rsvp-modal-aksara {
    display: block;
    font-family: "Javanese Text", "Noto Sans Javanese", sans-serif;
    font-size: 18px;
    color: rgba(204, 186, 130, 0.85);
    margin-top: 2px;
}

.rsvp-modal-subtitle {
    font-family: var(--utary-font-secondary, "Ovo", sans-serif);
    font-size: 12.5px;
    color: rgba(245, 238, 220, 0.78);
    margin: 6px 0 0;
    line-height: 1.4;
}

.rsvp-form-field {
    margin-bottom: 14px;
}

.rsvp-form-label {
    display: block;
    font-family: var(--utary-font, "Gloock", serif);
    font-size: 13.5px;
    color: #CCBA82;
    margin-bottom: 6px;
    letter-spacing: 0.3px;
}

.rsvp-text-input,
.rsvp-textarea-input {
    width: 100%;
    box-sizing: border-box;
    background-color: #CCBA82 !important;
    color: #44291f !important;
    font-weight: 500 !important;
    border: 1.5px solid #CCBA82 !important;
    border-radius: 8px !important;
    padding: 10px 12px !important;
    font-family: var(--utary-font-secondary, "Ovo", sans-serif) !important;
    font-size: 14px !important;
    line-height: 1.45 !important;
    outline: none !important;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.rsvp-text-input::placeholder,
.rsvp-textarea-input::placeholder {
    color: rgba(68, 41, 31, 0.6) !important;
}

.rsvp-text-input:focus,
.rsvp-textarea-input:focus {
    box-shadow: 0 0 0 3px rgba(204, 186, 130, 0.35) !important;
}

.rsvp-textarea-input {
    resize: vertical;
    min-height: 110px;
}

/* Pilihan Radio Kehadiran (Bisa Hadir / Belum Bisa Hadir) - Konsep A: Heritage Dark Gold Glow */
.rsvp-radio-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

/* Opsi Tidak Terpilih (Default/Inactive): Tenang, muted, tidak mencolok */
.rsvp-radio-label {
    position: relative;
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 10px 12px;
    border-radius: 9px;
    border: 1px solid rgba(204, 186, 130, 0.28);
    background: rgba(0, 0, 0, 0.24);
    color: rgba(245, 238, 220, 0.55);
    font-family: var(--utary-font-secondary, "Ovo", sans-serif);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    user-select: none;
    transition: all 0.22s ease;
    box-sizing: border-box;
}

.rsvp-radio-label:hover {
    border-color: rgba(204, 186, 130, 0.55);
    background: rgba(204, 186, 130, 0.06);
    color: rgba(245, 238, 220, 0.85);
}

.rsvp-radio-label input[type="radio"] {
    appearance: none;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border: 1.5px solid rgba(204, 186, 130, 0.45);
    border-radius: 50%;
    margin: 0;
    display: grid;
    place-content: center;
    flex-shrink: 0;
    background: transparent;
    transition: all 0.2s ease;
    cursor: pointer;
}

.rsvp-radio-label input[type="radio"]::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    transform: scale(0);
    transition: transform 0.18s cubic-bezier(0.2, 0, 0.2, 1);
    background: #CCBA82;
    box-shadow: 0 0 6px rgba(204, 186, 130, 0.8);
}

/* Opsi Terpilih (Active/Selected): Tegas, bersinar keemasan, teks emas terang */
.rsvp-radio-label.is-selected {
    background: rgba(204, 186, 130, 0.15) !important;
    color: #CCBA82 !important;
    font-weight: 700 !important;
    border: 1.5px solid #CCBA82 !important;
    box-shadow: 0 0 14px rgba(204, 186, 130, 0.22), inset 0 0 8px rgba(204, 186, 130, 0.08) !important;
}

.rsvp-radio-label.is-selected input[type="radio"] {
    border: 2px solid #CCBA82 !important;
    background: rgba(204, 186, 130, 0.12) !important;
}

.rsvp-radio-label.is-selected input[type="radio"]::before {
    transform: scale(1) !important;
    background: #CCBA82 !important;
    box-shadow: 0 0 6px rgba(204, 186, 130, 0.8) !important;
}

/* Tombol Kirim Heritage Classic (Pill Emas Mewah Selaras Seluruh Halaman) */
button.rsvp-submit-btn,
.rsvp-submit-btn {
    position: relative !important;
    overflow: hidden !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    height: 44px !important;
    min-height: 44px !important;
    margin-top: 14px !important;
    padding: 0 24px !important;
    border: none !important;
    border-radius: 999px !important;
    background-color: #CCBA82 !important;
    color: #2e201a !important;
    font-family: var(--utary-font-secondary, "Ovo", serif) !important;
    font-size: 13.5px !important;
    font-weight: 700 !important;
    letter-spacing: 1.2px !important;
    text-transform: uppercase !important;
    line-height: 1 !important;
    cursor: pointer !important;
    gap: 8px !important;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.65), 0 3px 8px rgba(0, 0, 0, 0.4) !important;
    transition: transform 0.22s cubic-bezier(0.2, 0, 0.2, 1), filter 0.22s ease, box-shadow 0.22s ease !important;
    outline: none !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    box-sizing: border-box !important;
}

button.rsvp-submit-btn *,
.rsvp-submit-btn * {
    color: #2e201a !important;
    fill: #2e201a !important;
}

button.rsvp-submit-btn:hover:not(:disabled),
.rsvp-submit-btn:hover:not(:disabled) {
    transform: scale(0.98) !important;
    filter: brightness(0.94) !important;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.5) !important;
}

button.rsvp-submit-btn:active:not(:disabled),
.rsvp-submit-btn:active:not(:disabled) {
    transform: scale(0.95) !important;
}

button.rsvp-submit-btn:disabled,
.rsvp-submit-btn:disabled {
    opacity: 0.65 !important;
    cursor: wait !important;
}

/* Alert Error Selaras Elegan */
.rsvp-error-alert {
    margin-bottom: 12px;
    padding: 9px 13px;
    border-radius: 8px;
    background: rgba(68, 41, 31, 0.95);
    border: 1.5px solid #CCBA82;
    color: #fdf5e6;
    font-family: var(--utary-font-secondary, "Ovo", sans-serif);
    font-size: 13px;
    line-height: 1.4;
    display: none;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}

/* View Sukses Centang di Dalam Pop-Up (Tema Emas & Coklat Mewah) */
.rsvp-modal-success {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 26px 12px 20px;
}

.rsvp-modal-success.is-visible {
    display: flex;
    animation: rsvpSuccessPop 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes rsvpSuccessPop {
    0% {
        opacity: 0;
        transform: scale(0.88);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.rsvp-check-circle {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(68, 41, 31, 0.85);
    border: 2px solid #CCBA82;
    color: #CCBA82;
    font-size: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
    box-shadow: 0 0 24px rgba(204, 186, 130, 0.4);
}

.rsvp-success-title {
    font-family: var(--utary-font, "Gloock", serif);
    font-size: 21px;
    color: #CCBA82;
    margin: 0 0 6px;
}

.rsvp-success-desc {
    font-family: var(--utary-font-secondary, "Ovo", sans-serif);
    font-size: 13.5px;
    color: #f5eedc;
    margin: 0;
    line-height: 1.5;
}

@media (max-width: 420px) {
    .rsvp-radio-group {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    .rsvp-modal-card {
        padding: 20px 16px 18px;
    }
}
