.rsvp-section {
    position: relative;
    width: 100%;
    min-height: 100svh;
    padding: 90px 24px;
    overflow: hidden;
    isolation: isolate;
    background-image: url("../assets/images/Background 3.png");
    color: var(--color-text);
    background-position: top center;
    background-size: 100% auto;
    background-repeat: repeat-y;
    font-family: var(--body, "Montserrat", sans-serif);
}

/* ========================================
   ORNAMEN SUDUT ATAS
   Dibuat sedikit keluar agar motif
   benar-benar mentok ke pinggir
======================================== */

.rsvp-corner-ornament {
  position: absolute;
  top: 0;
  z-index: 3;
  width: clamp(90px, 14vw, 190px);
  height: auto;
  pointer-events: none;
}

.rsvp-corner-ornament-left {
  left: -1px !important;
}

.rsvp-corner-ornament-right {
  right: -1px !important;
  transform: scaleX(-1);
}


/* ========================================
   ORNAMEN SUDUT BAWAH
======================================== */

.rsvp-bottom-ornament {
  position: absolute;
  bottom: 0;
  z-index: 3;
  width: clamp(90px, 14vw, 190px);
  height: auto;
  pointer-events: none;
}

.rsvp-bottom-ornament-left {
  left: -1px !important;
  transform: scaleY(-1);
}

.rsvp-bottom-ornament-right {
  right: -1px !important;
  transform: scale(-1, -1);
}

/* Header */
.rsvp-header {
    position: relative;
    z-index: 3;
    max-width: 850px;
    margin: 0 auto 50px;
    text-align: center;
    opacity: 0;
    transform: translateY(35px);
    transition:
        opacity 0.8s ease,
        transform 0.8s ease;
}

.rsvp-section.is-visible .rsvp-header {
    opacity: 1;
    transform: translateY(0);
}

.rsvp-title {
    position: relative;
    display: inline-block;
    margin-bottom: 18px;
}

.rsvp-title h2 {
  margin: 0 !important;
  font-family: var(--font-primary) !important;
  font-size: 80px !important;
  font-weight: 600 !important;
  line-height: 1.1 !important;
  color: var(--color-primary);
}

.rsvp-title span {
    display: block;
    margin-top: 8px;
    color: #a64f35;
    font-family: var(--heading, "Cormorant Garamond", serif);
    font-size: 40px;
    font-style: italic;
    font-weight: 600;
    line-height: 1;
}

.rsvp-header > p {
  max-width: 430px !important;
  margin: 24px auto 0 !important;
  font-family: var(--font-secondary) !important;
  font-size: 16px !important;
  font-weight: 600 !important;
  line-height: 1.9;
  color: #80695b;
}

/* Card utama */
.rsvp-card {
    position: relative;
    z-index: 3;
    width: 100%;
    max-width: 760px;
    margin: 0 auto;
    margin-bottom: 80px;
    padding: 34px;
    background: rgba(255, 252, 246, 0.88);
    border: 1px solid rgba(166, 79, 53, 0.22);
    border-radius: 24px;
    box-shadow: 0 18px 45px rgba(59, 41, 34, 0.10);
    opacity: 0;
    transform: translateY(35px);
    transition:
        opacity 0.8s ease 0.15s,
        transform 0.8s ease 0.15s;
}

.rsvp-section.is-visible .rsvp-card {
    opacity: 1;
    transform: translateY(0);
}

/* Judul jumlah komentar */
.rsvp-comment-title {
    margin: 0 0 24px;
    color: #3b2922;
    font-family: var(--heading, "Cormorant Garamond", serif);
    font-size: 1.65rem !important;
    font-weight: 600;
    text-align: center;
}

.rsvp-comment-title span {
    color: #a64f35;
    font-size: 1.65rem !important;
    font-family: var(--heading, "Cormorant Garamond", serif) !important;
}

/* Divider */
.rsvp-divider {
    width: 100%;
    height: 1px;
    margin: 28px 0;
    background: rgba(166, 79, 53, 0.20);
}

/* =========================================================
   RSVP — Tahap 2: Statistik & Form
   ========================================================= */

/* Statistik */
.rsvp-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 28px;
}

.rsvp-stat {
    padding: 16px 10px;
    text-align: center;
    background: #f3ede2;
    border: 1px solid rgba(166, 79, 53, 0.15);
    border-radius: 16px;
}

.rsvp-stat h5 {
    margin: 0 0 5px;
    color: #a64f35;
    font-family: var(--heading, "Cormorant Garamond", serif);
    font-size: 1.8rem;
    font-weight: 600;
    line-height: 1;
}

.rsvp-stat span {
    color: #6b5549;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.04em;
}

/* Form */
.rsvp-field {
    margin-bottom: 18px;
}

.rsvp-field label {
    display: block;
    margin-bottom: 8px;
    color: #3b2922;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.06em;
}

.rsvp-field input,
.rsvp-field textarea {
    display: block;
    width: 100%;
    padding: 13px 15px;
    color: #3b2922;
    background: #faf7f0;
    border: 1px solid rgba(166, 79, 53, 0.20);
    border-radius: 12px;
    outline: none;
    font-family: var(--body, "Montserrat", sans-serif);
    font-size: 0.78rem;
    line-height: 1.6;
    transition:
        border-color 0.25s ease,
        box-shadow 0.25s ease;
}

.rsvp-field input::placeholder,
.rsvp-field textarea::placeholder {
    color: #9b887d;
}

.rsvp-field input:focus,
.rsvp-field textarea:focus {
    border-color: #a64f35;
    box-shadow: 0 0 0 3px rgba(166, 79, 53, 0.08);
}

.rsvp-field textarea {
    min-height: 125px;
    resize: vertical;
}

/* Input status */
.rsvp-status-input-wrap {
    position: relative;
}

.rsvp-status-input-wrap input {
    padding-right: 45px;
    cursor: pointer;
}

.rsvp-status-input-wrap i {
    position: absolute;
    top: 50%;
    right: 16px;
    color: #a64f35;
    font-size: 0.8rem;
    transform: translateY(-50%);
    pointer-events: none;
}

/* Tombol kirim */
.rsvp-submit-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    width: 100%;
    margin-top: 8px;
    padding: 13px 20px;
    color: #fffaf4;
    background: #a64f35;
    border: none;
    border-radius: 999px;
    font-family: var(--body, "Montserrat", sans-serif);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    cursor: pointer;
    transition:
        background 0.25s ease,
        transform 0.25s ease,
        box-shadow 0.25s ease;
}

.rsvp-submit-button:hover {
    background: #8f4029;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(143, 64, 41, 0.18);
}

.rsvp-submit-button:active {
    transform: translateY(0);
}

/* =========================================================
   RSVP — Tahap 3: Daftar Komentar
   ========================================================= */

.rsvp-comment-list {
    display: flex;
    flex-direction: column;
    gap: 18px;
    max-height: 390px;
    padding-right: 6px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(166, 79, 53, 0.35) transparent;
}

.rsvp-comment-list::-webkit-scrollbar {
    width: 5px;
}

.rsvp-comment-list::-webkit-scrollbar-track {
    background: transparent;
}

.rsvp-comment-list::-webkit-scrollbar-thumb {
    background: rgba(166, 79, 53, 0.35);
    border-radius: 999px;
}

/* Satu komentar */
.rsvp-comment {
    display: flex;
    align-items: flex-start;
    gap: 13px;

    padding-bottom: 18px;

    border-bottom: 1px solid rgba(166, 79, 53, 0.12);

    animation: rsvp-comment-in 0.45s ease both;
}

.rsvp-comment:last-child {
    padding-bottom: 0;
    border-bottom: none;
}

/* Avatar */
.rsvp-comment-avatar {
    display: flex;
    align-items: center;
    justify-content: center;

    flex: 0 0 40px;
    width: 40px;
    height: 40px;

    color: #fffaf4;
    background: #a64f35;
    border-radius: 50%;

    font-family: var(--heading, "Cormorant Garamond", serif);
    font-size: 1.15rem;
    font-weight: 600;
}

/* Isi komentar */
.rsvp-comment-content {
    flex: 1;
    min-width: 0;
}

.rsvp-comment-top {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 4px;
}

.rsvp-comment-name {
    margin: 0;

    color: #3b2922;
    font-size: 0.76rem;
    font-weight: 700;
}

.rsvp-comment-status {
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    color: #8f4029;
    background: rgba(166, 79, 53, 0.09);
    border-radius: 999px;
    font-size: 0.58rem;
    font-weight: 600;
}

.rsvp-comment-message {
    margin: 0 0 5px;

    color: #6b5549;
    font-size: 0.73rem;
    line-height: 1.7;
    word-break: break-word;
}

.rsvp-comment-time {
    color: #a08d82;
    font-size: 0.58rem;
}

/* Animasi komentar */
@keyframes rsvp-comment-in {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =========================================================
   RSVP — Tahap 4: Modal & Toast
   ========================================================= */

/* Modal */
.rsvp-status-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(59, 41, 34, 0.45);
    backdrop-filter: blur(5px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition:
        opacity 0.3s ease,
        visibility 0.3s ease;
}

.rsvp-status-modal.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.rsvp-status-box {
    position: relative;
    width: 100%;
    max-width: 400px;
    padding: 30px 24px 24px;
    background: #f9f4ea;
    border: 1px solid rgba(166, 79, 53, 0.20);
    border-radius: 22px;
    box-shadow: 0 20px 50px rgba(59, 41, 34, 0.20);
    transform: translateY(20px) scale(0.97);
    transition: transform 0.3s ease;
}

.rsvp-status-modal.is-open .rsvp-status-box {
    transform: translateY(0) scale(1);
}

.rsvp-status-box h3 {
    margin: 0 0 22px;
    color: #3b2922;
    font-family: var(--heading, "Cormorant Garamond", serif);
    font-size: 1.7rem;
    font-weight: 600;
    text-align: center;
}

.rsvp-status-close {
    position: absolute;
    top: 12px;
    right: 15px;
    width: 32px;
    height: 32px;
    color: #6b5549;
    background: transparent;
    border: none;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
}

.rsvp-status-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.rsvp-status-options button {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 13px 15px;
    color: #3b2922;
    background: #f3ede2;
    border: 1px solid rgba(166, 79, 53, 0.15);
    border-radius: 13px;
    font-family: var(--body, "Montserrat", sans-serif);
    font-size: 0.72rem;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    transition: 0.25s ease;
}

.rsvp-status-options button i {
    color: #a64f35;
    font-size: 1.1rem;
}

.rsvp-status-options button:hover {
    color: #fffaf4;
    background: #a64f35;
    border-color: #a64f35;
    transform: translateX(3px);
}

.rsvp-status-options button:hover i {
    color: #fffaf4;
}

/* Toast */
.rsvp-toast {
    position: fixed;
    left: 50%;
    bottom: 25px;
    z-index: 10000;
    display: flex;
    align-items: center;
    gap: 9px;
    width: max-content;
    max-width: calc(100% - 30px);
    padding: 12px 17px;
    color: #fffaf4;
    background: #3b2922;
    border-radius: 999px;
    box-shadow: 0 10px 30px rgba(59, 41, 34, 0.20);
    font-size: 0.68rem;
    opacity: 0;
    visibility: hidden;
    transform: translate(-50%, 15px);
    transition:
        opacity 0.3s ease,
        visibility 0.3s ease,
        transform 0.3s ease;
}

.rsvp-toast.is-show {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, 0);
}

.rsvp-toast i {
    color: #d99a72;
}

/* Ornamen sudut atas */
.rsvp-corner-ornament {
    position: absolute;
    top: 0;
    z-index: 5;
    width: clamp(90px, 14vw, 190px);
    height: auto;
    pointer-events: none;
}

.rsvp-corner-ornament-left {
    left: 14px;
}

.rsvp-corner-ornament-right {
    right: 14px;
    transform: scaleX(-1);
}

@media (min-width: 1200px) and (max-width: 1599px) {

  .rsvp-corner-ornament-left,
  .rsvp-bottom-ornament-left {
    left: -16px;
  }

  .rsvp-corner-ornament-right,
  .rsvp-bottom-ornament-right {
    right: -16px;
  }
}

@media (min-width: 1025px) and (max-width: 1199px) {

  .rsvp-corner-ornament-left,
  .rsvp-bottom-ornament-left {
    left: -15px;
  }

  .rsvp-corner-ornament-right,
  .rsvp-bottom-ornament-right {
    right: -15px;
  }
}

/* =========================================================
   RSVP — Responsive Tablet & Mobile
   ========================================================= */

@media (max-width: 1024px) {
    .rsvp-section {
        padding: 80px 22px;
    }

    .rsvp-card {
        max-width: 720px;
    }

    .rsvp-corner-ornament-left {
        left: 14px;
    }

    .rsvp-corner-ornament-right {
        right: 14px;
    }
}

@media (max-width: 768px) {
    .rsvp-section {
        padding: 70px 20px;
    }

    .rsvp-header {
        margin-bottom: 38px;
    }

    .rsvp-title h2 {
        font-size:45px !important;
    }

    .rsvp-title span {
        font-size: 35px !important;
    }

    .rsvp-header > p {
        font-size: 12px !important;
    }

    .rsvp-card {
        padding: 26px 20px;
        border-radius: 20px;
    }

    .rsvp-stats {
        gap: 8px;
    }

    .rsvp-stat {
        padding: 14px 7px;
    }

  .rsvp-corner-ornament-left,
  .rsvp-bottom-ornament-left {
    left: -12px;
  }

  .rsvp-corner-ornament-right,
  .rsvp-bottom-ornament-right {
    right: -12px;
  }
}

@media (max-width: 480px) {
    .rsvp-section {
        padding: 60px 25px;
    }

    .rsvp-header {
        margin-bottom: 32px;
    }

    .rsvp-header > p {
        font-size: 0.68rem;
    }

    .rsvp-card {
        padding: 23px 16px;
        border-radius: 18px;
    }

    .rsvp-comment-title {
        font-size: 1.3rem;
    }

    .rsvp-stats {
        gap: 6px;
    }

    .rsvp-stat h5 {
        font-size: 1.6rem;
    }

    .rsvp-stat span {
        font-size: 0.58rem;
    }

  .rsvp-corner-ornament-left,
  .rsvp-bottom-ornament-left {
    left: -11px;
  }

  .rsvp-corner-ornament-right,
  .rsvp-bottom-ornament-right {
    right: -11px;
  }
}

@media (max-width: 420px) {
    .rsvp-section {
        padding: 55px 25px;
    }

    .rsvp-card {
        padding: 21px 14px;
    }

  .rsvp-corner-ornament-left,
  .rsvp-bottom-ornament-left {
    left: -10px;
  }

  .rsvp-corner-ornament-right,
  .rsvp-bottom-ornament-right {
    right: -10px;
  }
}

@media (max-width: 360px) {
    .rsvp-section {
        padding: 50px 20px;
    }

    .rsvp-card {
        padding: 19px 12px;
    }

  .rsvp-corner-ornament-left,
  .rsvp-bottom-ornament-left {
    left: -9px;
  }

  .rsvp-corner-ornament-right,
  .rsvp-bottom-ornament-right {
    right: -9px;
  }

  .rsvp-stat {
    padding: 12px 5px;
  }

    .rsvp-stat h5 {
        font-size: 1.45rem;
    }
}

/* =========================================================
   RSVP — Tahap 6: Detail Status & Mobile
   ========================================================= */

/* Status berdasarkan pilihan */
.rsvp-comment-status[data-status="Hadir"] {
    color: #5d6b3a;
    background: rgba(93, 107, 58, 0.10);
}

.rsvp-comment-status[data-status="Tidak Hadir"] {
    color: #8f4029;
    background: rgba(143, 64, 41, 0.10);
}

.rsvp-comment-status[data-status="Ragu-ragu"] {
    color: #8a6a38;
    background: rgba(138, 106, 56, 0.11);
}

/* Fokus keyboard */
.rsvp-submit-button:focus-visible,
.rsvp-status-close:focus-visible,
.rsvp-status-options button:focus-visible,
.rsvp-status-input-wrap:focus-within {
    outline: 2px solid #a64f35;
    outline-offset: 3px;
}

/* Jangan biarkan halaman bergeser saat modal terbuka */
body.rsvp-modal-open {
    overflow: hidden;
}

/* Mobile modal */
@media (max-width: 480px) {
    .rsvp-status-modal {
        padding: 15px;
    }

    .rsvp-status-box {
        padding: 28px 18px 20px;
        border-radius: 19px;
    }

    .rsvp-status-box h3 {
        margin-bottom: 18px;
        font-size: 1.55rem;
    }

    .rsvp-status-options button {
        padding: 12px 13px;
    }

    .rsvp-toast {
        bottom: 18px;
        padding: 11px 14px;
        font-size: 0.62rem;
    }
}

@media (max-width: 360px) {
    .rsvp-status-box {
        padding: 26px 15px 18px;
    }

    .rsvp-status-box h3 {
        font-size: 1.45rem;
    }

    .rsvp-status-options button {
        gap: 10px;
        padding: 11px 12px;
    }

    .rsvp-toast {
        max-width: calc(100% - 24px);
        text-align: center;
    }
}

/* ========================================
   ORNAMEN SUDUT BAWAH SECTION
======================================== */

.rsvp-bottom-ornament {
  position: absolute;
  bottom: 0;
  z-index: 3;
  width: clamp(90px, 14vw, 190px);
  height: auto;
  pointer-events: none;
}

.rsvp-bottom-ornament-left {
  left: 14px;
  transform: scaleY(-1);
}

.rsvp-bottom-ornament-right {
  right: 14px;
  transform: scale(-1, -1);
}