/* 07-feedback.css — Thumbnail galeri, toast, kerangka modal, alert badge, area tanda tangan.
   Diekstrak apa adanya dari index.html baris 1110-1276 (commit 4734b5c).
   URUTAN MUAT PENTING: prefix angka menentukan urutan <link>. Jangan ditukar —
   beberapa selektor sengaja didefinisikan ulang dan bergantung pada urutan ini.
   Lihat docs/DECISIONS.md K-5. */

.gallery-thumb {
    display: flex;
    gap: 0.3rem;
    flex-wrap: wrap;
}

.gallery-thumb .thumb {
    width: 45px;
    height: 45px;
    border-radius: 8px;
    object-fit: cover;
    border: 1px solid #f0d0d0;
    cursor: pointer;
    transition: 0.15s;
}

.gallery-thumb .thumb:hover {
    transform: scale(1.1);
    border-color: #d42a2a;
}

.gallery-thumb .thumb-placeholder {
    width: 45px;
    height: 45px;
    border-radius: 8px;
    background: #f0e8e8;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.6rem;
    color: #8a6a6a;
    border: 1px dashed #f0d0d0;
}

/* Toast: kartu putih ringkas di kanan bawah — ikon status kecil, judul,
 * deskripsi, tombol tutup (presentation/components/toast.js). Hanya ikon yang
 * berwarna per jenis; tanpa gradient, tanpa pill.
 *
 * z-index 1100: di atas overlay modal (1000), supaya pesan gagal/berhasil saat
 * modal terbuka tidak tertutup latar modal (sebelumnya 999, di bawahnya).
 *
 * Wadah tetap pointer-events: none (klik tembus ke kontrol di bawahnya, seperti
 * sebelumnya); hanya tombol tutup yang bisa diklik, dan hanya selama tampil. */
.toast-msg {
    position: fixed;
    right: 1.5rem;
    bottom: 1.5rem;
    z-index: 1100;
    display: flex;
    align-items: flex-start;
    gap: 0.7rem;
    width: 360px;
    max-width: calc(100vw - 2rem);
    padding: 0.8rem 0.7rem 0.8rem 0.9rem;
    background: #ffffff;
    color: #2b1d1d;
    border: 1px solid #eadddd;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(40, 20, 20, 0.08), 0 1px 3px rgba(40, 20, 20, 0.06);
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.18s ease, transform 0.18s ease;
    pointer-events: none;
}

.toast-msg.show {
    opacity: 1;
    transform: translateY(0);
}

.toast-icon {
    flex-shrink: 0;
    margin-top: 0.1rem;
    font-size: 1rem;
    color: #5f6b78;
}

.toast-msg[data-variant="success"] .toast-icon {
    color: #2e7d32;
}

.toast-msg[data-variant="error"] .toast-icon {
    color: #c62828;
}

.toast-msg[data-variant="warning"] .toast-icon {
    color: #b26a00;
}

.toast-body {
    flex: 1;
    min-width: 0;
}

.toast-title {
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.toast-description {
    margin-top: 0.15rem;
    font-size: 0.8rem;
    line-height: 1.4;
    color: #6f5a5a;
    overflow-wrap: anywhere;
}

.toast-close {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    margin: -0.15rem 0 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #9a8585;
    font-size: 0.85rem;
    cursor: pointer;
}

.toast-close:hover {
    background: #f6eeee;
    color: #4a2f2f;
}

.toast-close:focus-visible {
    outline: 2px solid #d42a2a;
    outline-offset: 1px;
}

.toast-msg.show .toast-close {
    pointer-events: auto;
}

/* Tersembunyi: tombol tutup tidak bisa difokus/diklik. */
.toast-msg:not(.show) .toast-close {
    visibility: hidden;
}

/* Layar sempit: selebar layar dikurangi margin aman kiri-kanan. */
@media (max-width: 480px) {
    .toast-msg {
        left: 1rem;
        right: 1rem;
        bottom: 1rem;
        width: auto;
        max-width: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .toast-msg {
        transform: none;
        transition: opacity 0.01s;
    }
}

/* Selama halaman login tampil (.login-page, z-index 9999), notifikasi harus
 * berada di atasnya — sebelumnya pesan di halaman login (mis. "Sesi
 * berakhir") tertutup halaman login dan tidak pernah terlihat. Di luar
 * halaman login z-index notifikasi tidak berubah. */
#loginPage:not(.hidden) ~ .toast-msg {
    z-index: 10001;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.modal-overlay.show {
    display: flex;
}

.modal-box {
    background: white;
    border-radius: 2rem;
    padding: 2rem;
    max-width: 750px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.3);
    animation: fadePanel 0.25s ease;
}

.modal-box h3 {
    color: #b31b1b;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 2px solid #f0e0e0;
    padding-bottom: 0.8rem;
}

.modal-box .close-modal {
    float: right;
    background: none;
    border: none;
    font-size: 1.8rem;
    cursor: pointer;
    color: #8a6a6a;
    transition: 0.2s;
    line-height: 1;
}

.modal-box .close-modal:hover {
    color: #d42a2a;
    transform: rotate(90deg);
}

.alert-badge {
    padding: 0.2rem 0.6rem;
    border-radius: 60px;
    font-size: 0.6rem;
    font-weight: 700;
    animation: blink 1s infinite;
}

.alert-badge.danger {
    background: #ffcdd2;
    color: #c62828;
}

.alert-badge.warning {
    background: #fff3e0;
    color: #e65100;
}

.alert-badge.success {
    background: #e8f5e9;
    color: #2e7d32;
}

.signature-area {
    border: 2px dashed #d42a2a;
    border-radius: 12px;
    padding: 1rem;
    text-align: center;
    background: #fff8f8;
    margin-top: 0.5rem;
}

.signature-area .signature-text {
    font-family: 'Segoe UI', cursive;
    font-size: 1.5rem;
    color: #b31b1b;
}

.signature-area .signature-label {
    font-size: 0.7rem;
    color: #8a6a6a;
}

.signature-area.disetujui {
    border-color: #2e7d32;
    background: #f0f8f0;
}

