/* =========================
   GLOBAL BACKGROUND
========================= */

body {
    margin: 0;
    font-family: "Segoe UI", sans-serif;

    background-image: url("/assets/img/dealproduct.png");
    background-size: cover;
    background-position: center top;
    background-repeat: no-repeat;
    background-attachment: fixed;

    position: relative;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(255,255,255,0.85); /* 🔥 opacity bisa diatur */
    z-index: -1;
}

/* 🌙 Transparent Crescent Ornament */
body::after {
    content: "";
    position: fixed;
    top: 80px;
    right: 80px;
    width: 220px;
    height: 220px;
    background: radial-gradient(circle at 60% 40%, #f8a8c5 40%, transparent 41%);
    border-radius: 50%;
    opacity: 0.08;
    pointer-events: none;
}

/* =========================
   WRAPPER
========================= */

.poster-wrapper {
    display: flex;
    justify-content: center;
    padding: 60px 20px;
}

/* =========================
   CARD
========================= */

.poster-card {
    width: 100%;
    max-width: 900px;

    border-radius: 25px;
    padding: 45px;

    position: relative;

    box-shadow: 0 20px 50px rgba(0,0,0,0.08);

    animation: fadeIn 0.8s ease-in-out;
}

/* Background image inside container */
.poster-card::before {
    content: "";
    position: absolute;
    inset: 0;

    background-image: url("/assets/img/login_background.png");
    background-size: contain;
    background-position: center bottom;
    background-repeat: no-repeat;

    opacity: 0.06;  /* 🔥 atur 0.08 - 0.18 sesuai selera */
    z-index: 0;
}

.poster-card > * {
    position: relative;
    z-index: 1;
    backdrop-filter: blur(2px);
}

/* 🎬 Fade In */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =========================
   HEADER
========================= */

.poster-header {
    text-align: center;
    margin-bottom: 10px;
}

.header-banner {
    width: 100%;
    overflow: hidden;
    border-radius: 18px;
    margin-bottom: 3px;
}

.header-banner img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    box-shadow: 0 10px 30px rgba(233,30,99,0.15);
}

.logo-wrapper {
    margin-bottom: 15px;
}

.doodle-logo {
    max-width: 240px;
    height: auto;
}

.poster-header h2 {
    margin: 10px 0;
    color: #c2185b;
    font-weight: 600;
}

.poster-header p {
    color: #777;
}

/* =========================
   PREMIUM TABLE
========================= */

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    text-align: center;

    border-radius: 18px;
    overflow: hidden;
    background: white;

    border: 1px solid #f8c5d8;
    box-shadow: 0 8px 20px rgba(233, 30, 99, 0.08);
}

/* Gradient header */
th {
    background: linear-gradient(to right, #f8a8c5, #f48fb1);
    color: white;
    padding: 14px;
    font-size: 14px;
    letter-spacing: 0.5px;
}

/* Table cells */
td {
    padding: 11px;
    font-size: 13px;
    border-bottom: 1px solid #f3d9e3;
    transition: all 0.2s ease;
}

/* Zebra */
tr:nth-child(even) {
    background: #fff7fb;
}

/* ✨ Hover glow */
tbody tr:hover {
    background: #ffe0ef;
    box-shadow: inset 0 0 12px rgba(233, 30, 99, 0.15);
}

/* Highlight today */
.today-row {
    background: #ffd6e8 !important;
    font-weight: bold;
}

/* Rounded corners */
thead tr:first-child th:first-child {
    border-top-left-radius: 18px;
}

thead tr:first-child th:last-child {
    border-top-right-radius: 18px;
}

tbody tr:last-child td:first-child {
    border-bottom-left-radius: 18px;
}

tbody tr:last-child td:last-child {
    border-bottom-right-radius: 18px;
}

/* =========================
   COUNTDOWN
========================= */

.countdown-box {
    margin-top: 30px;
    text-align: center;
    font-weight: bold;
    color: #e91e63;
    font-size: 15px;
}

/* =========================
   FOOTER MODERN
========================= */

.poster-footer {
    margin-top: 45px;
    text-align: center;
    padding-top: 25px;
    border-top: 1px solid #f3d9e3;
}

.footer-copy {
    font-size: 11px;
    color: #999;
    opacity: 0.85;
    margin-bottom: 8px;
}

.footer-powered {
    font-size: 13px;
    font-weight: bold;
    color: #555;
    display: inline-block;
    transition: transform 0.3s ease;
}

.footer-powered:hover {
    transform: scale(1.08);
}

.footer-company {
    color: #FF3874;
}

/* =========================
   PRINT MODE A4 POSTER
========================= */
@media print {

    @page {
        size: A4 portrait;
        margin: 10mm;
    }

    body {
        background-image: url("/assets/img/dealproduct.png") !important;
        background-size: cover;
        background-position: center top;
        background-repeat: no-repeat;
    }

    .poster-card::before {
        background-image: url("/assets/img/login_background.png") !important;
        opacity: 0.12;
        display: block;
    }

   .poster-wrapper {
        padding: 0;
    }

    .poster-card {
        box-shadow: none;
        border-radius: 0;
        padding: 10mm;

        display: flex;
        flex-direction: column;
        min-height: 260mm; /* 🔥 sedikit lebih kecil dari A4 */
        position: relative;
        z-index: 1;
    }

    /* Table tetap natural */
    table {
        margin-bottom: 10mm;
    }

    /* Footer otomatis turun */
    .poster-footer {
        margin-top: auto;  /* 🔥 ini kuncinya */
    }

    /* Compact table */
    th {
        font-size: 10px;
        padding: 5px;
    }

    td {
        font-size: 9px;
        padding: 3px;
    }

    .poster-header h2 {
        font-size: 16px;
        margin-bottom: 5px;
    }

    .doodle-logo {
        max-width: 150px;
    }

    .floating-countdown {
        display: none !important;
    }

    tbody tr:hover {
        box-shadow: none;
        background: inherit;
    }
}

/* =========================
   FLOATING COUNTDOWN
========================= */

.floating-countdown {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);

    background: linear-gradient(to right, #f48fb1, #f06292);
    color: white;

    padding: 12px 28px;
    border-radius: 40px;

    font-weight: bold;
    font-size: 14px;

    box-shadow: 0 10px 25px rgba(233, 30, 99, 0.25);

    z-index: 999;
    transition: all 0.3s ease;
}

/* Hover sedikit glow */
.floating-countdown:hover {
    transform: translateX(-50%) scale(1.05);
}

/* =========================
   CITY SELECTOR PREMIUM
========================= */

.city-selector {
    position: relative;
    display: inline-block;
    margin-top: 10px;
    position: relative;
    z-index: 10000;
}

.city-display {
    cursor: pointer;
    font-weight: 500;
    color: #777;
    transition: color 0.2s ease;
}

.city-display:hover {
    color: #e91e63;
}

.city-arrow {
    margin-left: 4px;
    font-size: 12px;
}

.city-dropdown {
    position: fixed;
    top: 35px; /* sesuaikan tinggi header */
    left: 50%;
    transform: translateX(-50%);

    background: white;
    border-radius: 14px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);

    padding: 8px 0;
    min-width: 180px;

    display: none;
    z-index: 9999;
}

.city-dropdown.show {
    display: block;
}

.city-option {
    padding: 8px 15px;
    cursor: pointer;
    font-size: 13px;
    transition: background 0.2s ease;
}

.city-option:hover {
    background: #ffe0ef;
}

/* ======================================
   RAMADHAN ATMOSPHERE INSIDE CONTAINER
   (Tidak mengubah struktur apapun)
====================================== */

/* Layer tambahan di dalam card */
.poster-card::after {
    content: "";
    position: absolute;
    inset: 0;

    background:
        radial-gradient(circle at 85% 15%, rgba(255, 192, 203, 0.15) 0%, transparent 40%),
        radial-gradient(circle at 15% 25%, rgba(255, 105, 180, 0.12) 0%, transparent 45%);

    pointer-events: none;
    z-index: 0;
    top: 50px;
    right: 70px;
    width: 130px;
    height: 130px;
    border-radius: 50%;
    box-shadow: 30px 0 0 0 rgba(233,30,99,0.08);
    pointer-events: none;
}

/* Ornamen bulan sabit */
.poster-card .ramadhan-crescent {
    position: absolute;
    top: 40px;
    right: 60px;
    width: 140px;
    height: 140px;
    border-radius: 50%;
    box-shadow: 25px 0 0 0 rgba(233, 30, 99, 0.08);
    pointer-events: none;
}

/* Siluet masjid lembut di bawah */
.poster-card::before {
    background-image: url("/assets/img/login_background.png");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center bottom;
    opacity: 0.06;
}

/* Subtle inner glow */
.poster-card {
    box-shadow:
        0 20px 50px rgba(0,0,0,0.08),
        inset 0 0 60px rgba(233, 30, 99, 0.04);
}

/* Subtle sparkle animation */
@keyframes ramadhanGlow {
    0% { opacity: 0.04; }
    50% { opacity: 0.09; }
    100% { opacity: 0.04; }
}

.poster-card::after {
    animation: ramadhanGlow 6s ease-in-out infinite;
}
