/* --- Pengaturan Dasar & Variabel Warna --- */
/* Menggunakan variabel memudahkan jika Anda ingin mengubah tema warna nanti */
:root {
    --primary-color: #4a69bd; /* Warna utama, bisa diganti sesuai tema undangan Anda */
    --secondary-color: #6a89cc;
    --text-color: #333;
    --text-color-light: #666;
    --border-color: #e0e0e0;
    --background-light: #f9f9f9;
    --success-color: #27ae60;
    --danger-color: #c0392b;
    --font-family: 'Poppins', sans-serif; /* Menggunakan font dari Google Fonts */
}

/* --- Styling Container Utama --- */
.undangan-wishes-container {
    font-family: var(--font-family);
    max-width: 700px; /* Sedikit lebih lebar untuk kenyamanan */
    margin: 30px auto;
    padding: 30px;
    background-color: #fff;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
}

/* --- Styling Formulir --- */
.wishes-form .form-group {
    margin-bottom: 20px;
}
.wishes-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-color);
}
.wishes-form input[type="text"],
.wishes-form textarea,
.wishes-form select {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-sizing: border-box;
    transition: border-color 0.3s, box-shadow 0.3s;
    background-color: #fff;
}
.wishes-form input[type="text"]:focus,
.wishes-form textarea:focus,
.wishes-form select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(74, 105, 189, 0.2);
}
.wishes-form .radio-group label {
    font-weight: 400;
    margin-right: 20px;
}
#jumlah-tamu-group {
    display: none;
}

/* --- Styling Tombol Utama (Kirim & Lihat) --- */
.button-wrapper {
    display: flex;
    gap: 15px;
    margin-top: 25px;
}
.button-wrapper button {
    flex: 1;
    padding: 12px 15px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}
/* Tombol Kirim (Primary) */
.button-wrapper button[type="submit"] {
    background-color: var(--primary-color);
    color: white;
}
.button-wrapper button[type="submit"]:hover {
    background-color: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}
/* Tombol Lihat Ucapan (Secondary/Outline) */
.button-wrapper button#view-wishes-button {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}
.button-wrapper button#view-wishes-button:hover {
    background-color: var(--primary-color);
    color: white;
}


/* --- Styling Pop-up --- */
.popup-container {
    background-color: rgba(0,0,0,0.7); /* Lebih gelap agar fokus ke pop-up */
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}
.popup-content {
    background-color: #fff;
    padding: 25px;
    border: none;
    width: 90%;
    max-width: 550px;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
    display: flex;
    flex-direction: column;
    max-height: 85vh;
}
.popup-content h2 {
    margin-top: 0;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-color);
    font-weight: 600;
}
.close-popup {
    color: #999;
    position: absolute;
    top: 15px;
    right: 25px;
    font-size: 32px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s, transform 0.3s;
}
.close-popup:hover, .close-popup:focus {
    color: var(--danger-color);
    transform: rotate(90deg);
}

/* --- Styling Daftar Ucapan --- */
.wishes-list {
    overflow-y: auto;
    flex-grow: 1;
    padding-right: 10px; /* Memberi ruang untuk scrollbar */
}
.wish-item {
    border-bottom: 1px solid var(--border-color);
    padding: 20px 5px;
}
.wish-item:last-child {
    border-bottom: none;
}
.wish-item .wish-header { /* Wrapper baru untuk nama dan status */
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}
.wish-item strong {
    font-size: 1.1em;
    font-weight: 600;
    color: var(--primary-color);
    display: flex;
    align-items: center;
}
.wish-item strong .fas {
    margin-right: 10px;
    color: var(--primary-color);
}
/* Status Kehadiran (Badge/Pill Style) */
.wish-item span {
    font-size: 0.8em;
    font-weight: 500;
    padding: 5px 12px;
    border-radius: 20px;
    float: none; /* Hapus float */
}
.wish-item span .fa-check-circle {
    color: var(--success-color);
    background: white;
    border-radius: 50%;
}
.wish-item span .fa-times-circle {
    color: var(--danger-color);
}
.wish-item span:has(.fa-check-circle) {
    background-color: #eafaf1;
    color: var(--success-color);
}
.wish-item span:has(.fa-times-circle) {
    background-color: #fbecec;
    color: var(--danger-color);
}
.wish-item p.wish-text {
    margin: 8px 0 0;
    color: var(--text-color-light);
    line-height: 1.6;
}

/* --- Styling Balasan --- */
.wish-replies {
    margin-top: 15px;
    margin-left: 10px;
    border-left: 3px solid var(--primary-color);
    padding-left: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}
.wish-reply {
    background: var(--background-light);
    padding: 12px;
    border-radius: 8px;
}
.wish-reply strong {
    font-size: 0.95em;
    color: var(--text-color);
}
.wish-reply p {
    margin: 5px 0 0;
    font-size: 0.9em;
    color: var(--text-color-light);
}

/* --- Paginasi --- */
.wishes-pagination {
    text-align: center;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
}
.wishes-pagination .page-link {
    color: var(--primary-color);
    padding: 8px 14px;
    text-decoration: none;
    border: 1px solid var(--border-color);
    margin: 0 4px;
    border-radius: 8px;
    transition: all 0.3s ease;
}
.wishes-pagination .page-link.active,
.wishes-pagination .page-link:hover {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}