/* public/css/wishes.css */

.wishes-section {
    position: relative;
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin: 0;
}

.wishes-bg-image {
    position: absolute;
    /* Memastikan tidak ada celah di pinggir layar */
    top: -1px;
    left: -1px;
    right: -1px;
    bottom: -1px;
    background-size: cover;
    background-position: center;
    z-index: 1;
    /* Paksa gambar sedikit lebih besar agar menutupi area secara total */
    transform: scale(1.1);
}

/* Background spesifik untuk halaman Input Wishes */
.wishes-input-page .wishes-bg-image {
    background-image: url('/images/SLM09292.JPG');
}

/* Background spesifik untuk halaman Display Wishes */
.wishes-display-page .wishes-bg-image {
    background-image: url('/images/SLM09292.JPG');
}

.wishes-overlay {
    position: absolute;
    inset: 0;
    /* Menggunakan overlay gelap agar teks putih tetap kontras */
    background: rgba(0, 0, 0, 0.6);
    z-index: 2;
}

.wishes-content {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 450px;
    padding: 0 30px;
    color: white;
    text-align: center;
}

/* Form Styling */
.wish-input,
.wish-textarea {
    width: 100%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 12px 15px;
    color: white;
    margin-bottom: 15px;
    border-radius: 4px;
}

.send-btn {
    width: 100%;
    padding: 15px;
    background: white;
    color: black;
    border: none;
    letter-spacing: 2px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

/* Gallery Styling */
.wishes-display-container {
    max-height: 60vh;
    overflow-y: auto;
    padding-right: 10px;
}

/* Custom Scrollbar agar tetap clean */
.wishes-display-container::-webkit-scrollbar {
    width: 3px;
}

.wishes-display-container::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
}

.wish-item {
    background: rgba(255, 255, 255, 0.05);
    padding: 20px;
    margin-bottom: 15px;
    text-align: left;
    border-left: 2px solid rgba(255, 255, 255, 0.4);
}

/* Update Galeri Styling */
.wishes-slider {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    scrollbar-width: none;
}

.wishes-slider::-webkit-scrollbar {
    display: none;
}

.wishes-slide {
    flex: 0 0 100%;
    width: 100%;
    scroll-snap-align: start;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

.wishes-grid {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 100%;
}

.wish-item {
    background: rgba(255, 255, 255, 0.05);
    padding: 15px 20px;
    text-align: left;
    border-left: 2px solid rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(5px);
}

.wish-name {
    font-size: 14px;
    margin-bottom: 5px;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.wish-text {
    font-size: 12px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 300;
}

.scroll-hint {
    text-align: center;
    font-size: 9px;
    letter-spacing: 2px;
    margin-top: 20px;
    opacity: 0.5;
    text-transform: uppercase;
}

/* --- OVERRIDE GLOBAL UNTUK MOBILE --- */
@media (max-width: 1023px) {

    .wishes-section {
        height: 100dvh !important;
        width: 100% !important;
        position: relative;
        display: flex;
        align-items: center;
        justify-content: center;
        overflow: hidden;
    }

    .wishes-bg-image {
        height: 100% !important;
        width: 100% !important;
        position: absolute;
        inset: 0;
        transform: scale(1.1);
        /* Zoom aman untuk coverage penuh */
        background-size: cover !important;
        background-position: center center !important;
        z-index: 1;
    }

    .wishes-overlay {
        background: rgba(0, 0, 0, 0.65);
        /* Sedikit lebih gelap agar teks input jelas */
        z-index: 2;
    }

    .wishes-content {
        height: 100%;
        display: flex;
        flex-direction: column;
        justify-content: center;
        /* Konten di tengah layar */
        padding: 0 25px !important;
        max-width: 100%;
        z-index: 10;
    }

    /* --- INPUT PAGE STYLING --- */
    .section-title {
        font-size: 10px;
        letter-spacing: 0.4em;
        margin-bottom: 15px;
    }

    .wishes-desc {
        font-size: 12px;
        line-height: 1.6;
        margin-bottom: 25px;
        opacity: 0.8;
    }

    .wish-input,
    .wish-textarea {
        background: rgba(255, 255, 255, 0.12);
        border: 1px solid rgba(255, 255, 255, 0.2);
        font-size: 13px;
        /* Ukuran teks input yang nyaman di HP */
        padding: 12px;
    }

    .send-btn {
        padding: 14px;
        font-size: 11px;
        letter-spacing: 2px;
        margin-top: 5px;
    }

    /* --- DISPLAY PAGE STYLING --- */
    .wishes-grid {
        gap: 12px;
        /* Jarak antar item ucapan */
    }

    .wish-item {
        padding: 12px 15px;
        border-left: 2px solid rgba(255, 255, 255, 0.5);
    }

    .wish-name {
        font-size: 12px;
        margin-bottom: 4px;
    }

    .wish-text {
        font-size: 11.5px;
        line-height: 1.5;
    }

    .scroll-hint {
        margin-top: 15px;
        font-size: 8px;
    }
}

/* Fix khusus untuk layar HP pendek (iPhone SE / Flip) */
@media (max-height: 660px) and (orientation: portrait) {
    .wishes-content {
        padding-top: 20px !important;
    }

    .wishes-desc {
        font-size: 11px;
        margin-bottom: 15px;
    }

    .wish-textarea {
        grid-row: 3;
        height: 80px;
    }

    .wish-item {
        padding: 10px;
    }

    .wishes-grid {
        gap: 8px;
    }
}