/* assets/css/style.css */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body {
    background: #fff7fb;
    color: #333;
    overflow-x: hidden; /* cegah scroll horizontal */
}

.wrapper {
    max-width: 960px;
    margin: 30px auto;
    padding: 20px;
    background-color: transparent;   /* <-- ini yang penting */
    border-radius: 24px;
}

.card {
    background: #ffffff;
    border-radius: 16px;
    padding: 24px;
    width: 100%;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0,0,0,0.06);
    border: 1px solid #ffe3f0;
}

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

.header h1 {
    font-size: 2rem;
    margin-bottom: 5px;
    color: #d65b93;
}

.header p {
    color: #666;
}

.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    background: #ffe9f4;
    color: #c5327d;
    font-size: 0.75rem;
    margin-bottom: 6px;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group.full {
    grid-column: 1 / -1;
}

.form-group label {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 6px;
    color: #555;
}

.form-group span.hint {
    font-size: 0.75rem;
    color: #999;
}

input[type="text"],
input[type="datetime-local"],
input[type="file"],
textarea,
select {
    width: 100%;
    max-width: 100%;
    border-radius: 10px;
    border: 1px solid #f3c1da;
    padding: 10px 12px;
    font-size: 0.9rem;
    outline: none;
    background: #fff9fd;
}

input:focus,
textarea:focus,
select:focus {
    border-color: #e67fb5;
    box-shadow: 0 0 0 2px rgba(230,127,181,0.15);
    background: #ffffff;
}

textarea {
    min-height: 80px;
    resize: vertical;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 18px;
    border-radius: 999px;
    border: none;
    background: linear-gradient(135deg, #ff73b3, #ff9f93);
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    font-size: 0.95rem;
    margin-top: 10px;
}

.btn-primary:hover {
    opacity: 0.95;
    transform: translateY(-1px);
}

.btn-primary[disabled],
.btn-primary.btn-disabled {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

.notice {
    font-size: 0.8rem;
    color: #999;
    margin-top: 10px;
}

@media (max-width: 768px) {
    .form-grid {
        grid-template-columns: 1fr;
    }
}

.header-logo {
    margin: 10px 0;
}

.header-logo img {
    max-height: 80px;
    width: auto;
    border-radius: 16px;
    box-shadow: 0 6px 15px rgba(0,0,0,0.08);
    background: #fff;
    padding: 6px 10px;
    border: 1px solid #ffe3f0;
}

.header-social {
    margin-top: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px 16px;
    justify-content: center;
    font-size: 0.85rem;
}

.header-social .label {
    font-weight: 600;
    margin-right: 4px;
}

.header-social a {
    text-decoration: none;
    color: #c5327d;
}

.header-social a:hover {
    text-decoration: underline;
}

@media (max-width: 480px) {
    .header-social {
        flex-direction: column;
        align-items: center;
    }
}

.alert-error {
    background: #ffe5e5;
    border: 1px solid #ff9b9b;
    color: #b00020;
    padding: 10px 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    font-size: 0.9rem;
}

/* ===== Overlay Loading Kirim Pesanan ===== */
.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, 0.85);
    display: none; /* default: tidak kelihatan */
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-box {
    background: #ffffff;
    border-radius: 16px;
    padding: 16px 20px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
    text-align: center;
    max-width: 320px;
    width: 90%;
    border: 1px solid #f3c1da;
}

.loading-spinner {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 3px solid #f3c1da;
    border-top-color: #c5327d;
    margin: 0 auto 10px;
    animation: spin 0.8s linear infinite;
}

.loading-box p {
    margin: 2px 0;
    font-size: 0.85rem;
    color: #555;
}

.loading-subtext {
    font-size: 0.75rem;
    color: #888;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Gambar di dalam card portal */
.portal-item-image img {
    width: 100%;
    height: auto;
    display: block;
    max-width: 260px;      /* batas lebar maksimum di layar besar */
    margin: 0 auto 8px;    /* center + jarak ke judul */
}

/* Supaya isi card rata tengah, kalau mau */
.portal-item {
    text-align: center;
}

/* Floating WhatsApp */
.wa-floating {
    position: fixed;
    right: 16px;
    bottom: 16px;
    z-index: 1000;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #25D366;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
}
.wa-floating img {
    width: 60%;
    height: auto;
    display: block;
}
@media (max-width: 480px) {
    .wa-floating {
        width: 52px;
        height: 52px;
        right: 12px;
        bottom: 12px;
    }
}

/* Tombol Map */
.btn-map {
    margin-top: 1rem;
    padding: 0.6rem 1rem;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-size: 0.95rem;
    background-color: #f4b183; /* kalau mau, samakan dengan tema warna kamu */
    color: #222;
}

/* Modal – wrapper utama (hidden default) */
.map-modal {
    display: none; /* akan diubah ke flex oleh JS */
    position: fixed;
    inset: 0;
    z-index: 9999;
    justify-content: center;
    align-items: center;
}

/* Background gelap */
.map-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
}

/* Konten modal */
.map-modal-content {
    position: relative;
    max-width: 600px;
    width: 90%;
    background: #fff;
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
    z-index: 10000;
}

.map-modal-content h2 {
    margin-top: 0;
    margin-bottom: 0.5rem;
}

.map-modal-content p {
    margin-top: 0;
    margin-bottom: 1rem;
    line-height: 1.5;
}

/* Tombol X close */
.map-modal-close {
    position: absolute;
    top: 0.5rem;
    right: 0.75rem;
    background: transparent;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Wrapper iframe map */
.map-modal-frame-wrapper {
    border-radius: 8px;
    overflow: hidden;
}

.home-intro-card {
    margin-bottom: 1rem;
}

.home-intro {
    padding: 1rem 1.25rem;
    line-height: 1.7;
    font-size: 0.95rem;
}

.home-intro-title {
   font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.home-intro-lead {
    margin-bottom: 0.75rem;
}

.home-intro-subtitle {
    margin-top: 0.75rem;
    margin-bottom: 0.25rem;
    font-size: 0.9rem;
    font-weight: 600;
}

.home-intro-list {
    margin: 0.25rem 0 0;
    padding-left: 1.1rem;
    font-size: 0.9rem;
}

@media (min-width: 768px) {
    .home-intro-title {
        font-size: 1.25rem;  /* sedikit lebih besar di desktop */
    }

    .home-intro-subtitle {
        font-size: 1rem;
    }
}

/* Accordion di home (pakai gaya home-intro yg sudah ada) */
.home-intro-section {
    margin-top: 0.75rem;
    padding: 0.75rem 0.9rem;
    border-radius: 12px;
    border: 1px solid #ffe3f0;  /* sama seperti border .card */
    background: #fff9fd;        /* sama seperti input background */
}

/* summary pakai .home-intro-subtitle (sudah di-define), tinggal bikin klik-able */
.home-intro-section > summary {
    cursor: pointer;
    list-style: none; /* hilangkan bullet kalau ada */
}

/* Hilangkan marker default di WebKit (Chrome/Safari) */
.home-intro-section > summary::-webkit-details-marker {
    display: none;
}

/* Tambah icon kecil di kanan (opsional) */
.home-intro-section > summary::after {
    content: "▾";
    float: right;
    font-size: 0.75rem;
    opacity: 0.7;
}

/* Saat tertutup, putar icon */
.home-intro-section[open] > summary::after {
    transform: rotate(180deg);
}

/* Seasonal Background */
.ck-seasonal-bg {
    position: fixed;
    inset: 0;
    z-index: -1;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

/* overlay warna supaya teks/card tetap kebaca */
.ck-seasonal-bg-overlay {
    position: absolute;
    inset: 0;
    /* warna default diset dari JS (overlay_color) */
}

/* optional: kalau mau wrapper/card sedikit transparan supaya background kelihatan */
.ck-seasonal-bg-active .wrapper {
    background-color: transparent; /* sesuaikan dengan tema kamu */
    backdrop-filter: blur(2px);
}

/* pastikan .card tetap di atas background */
.wrapper,
.card {
    position: relative;
    z-index: 1;
}

/* Snow */
.ck-snow-layer {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}
.ck-snowflake {
    position: absolute;
    top: -10px;
    /* width & height di-set dari JS (inline style),
       jadi di sini kita hanya atur bentuknya */
    background:
      /* bulatan tengah */
      radial-gradient(circle,
        rgba(255,255,255,0.95) 0%,
        rgba(255,255,255,0.95) 40%,
        rgba(255,255,255,0)    42%),
      /* garis vertikal */
      linear-gradient(0deg,
        transparent 40%,
        rgba(255,255,255,0.95) 40%,
        rgba(255,255,255,0.95) 60%,
        transparent 60%),
      /* garis miring 60° */
      linear-gradient(60deg,
        transparent 40%,
        rgba(255,255,255,0.95) 40%,
        rgba(255,255,255,0.95) 60%,
        transparent 60%),
      /* garis miring 120° */
      linear-gradient(120deg,
        transparent 40%,
        rgba(255,255,255,0.95) 40%,
        rgba(255,255,255,0.95) 60%,
        transparent 60%);
    background-repeat: no-repeat;
    background-size: 100% 100%;
    animation-name: ck-snow-fall;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
    will-change: transform;
    /* sedikit glow supaya kelihatan lembut */
    filter: drop-shadow(0 0 4px rgba(255,255,255,0.8));
}
@keyframes ck-snow-fall {
    0% { transform: translate3d(0, -10px, 0); }
    100% { transform: translate3d(0, 110vh, 0); }
}

/* Fireworks (New Year) – lebih rame & glow */
.ck-fireworks-layer {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

/* gunakan CSS variable biar bisa besar–kecil dari JS */
.ck-firework {
    --fw-scale: 1;
    --fw-duration: 2.8s;
    --fw-delay: 0s;

    position: absolute;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: transparent;

    /* kombinasi warna pastel supaya tetap match tema Claire's Kitchen */
    box-shadow:
      0    0    0   0  rgba(255,255,255,0.95),
      10px 0    0   0  rgba(255,210,220,0.95),
     -10px 0    0   0  rgba(205,225,255,0.95),
      0    10px 0   0  rgba(255,255,210,0.95),
      0   -10px 0   0  rgba(210,255,230,0.95),
      7px  7px  0   0  rgba(255,190,235,0.95),
     -7px  7px  0   0  rgba(190,255,245,0.95),
      7px -7px  0   0  rgba(240,225,255,0.95),
     -7px -7px  0   0  rgba(255,220,230,0.95),
      16px 0    0   0  rgba(255,210,210,0.6),
     -16px 0    0   0  rgba(205,230,255,0.6),
      0    16px 0   0  rgba(255,255,220,0.6),
      0   -16px 0   0  rgba(210,255,230,0.6);

    filter: drop-shadow(0 0 6px rgba(255,255,255,0.9));
    transform-origin: center center;

    animation-name: ck-firework-burst;
    animation-duration: var(--fw-duration);
    animation-timing-function: ease-out;
    animation-iteration-count: infinite;
    animation-delay: var(--fw-delay);
    will-change: transform, opacity;
}

@keyframes ck-firework-burst {
    0% {
        transform: scale(calc(var(--fw-scale) * 0.2));
        opacity: 0;
    }
    10% {
        transform: scale(var(--fw-scale));
        opacity: 1;
    }
    100% {
        transform: scale(calc(var(--fw-scale) * 1.6));
        opacity: 0;
    }
}

/* Idul Fitri (stars) */
.ck-eid-layer {
    position: absolute;
    inset: 0;
    pointer-events: none;
}
.ck-eid-star {
    position: absolute;
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: #fdfbe6;
    box-shadow: 0 0 8px rgba(255,255,220,0.9);
    animation: ck-eid-twinkle 2.4s ease-in-out infinite;
}
@keyframes ck-eid-twinkle {
    0%, 100% { opacity: 0.2; transform: scale(0.8); }
    50%      { opacity: 1;   transform: scale(1.4); }
}

/* Halloween (floating orbs) */
.ck-halloween-layer {
    position: absolute;
    inset: 0;
    pointer-events: none;
}
.ck-halloween-orb {
    position: absolute;
    top: 60%;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #ffe0b3, #ff8800);
    box-shadow: 0 0 12px rgba(255,136,0,0.8);
    opacity: 0.8;
    animation: ck-halloween-float 10s ease-in-out infinite;
}
@keyframes ck-halloween-float {
    0%   { transform: translate3d(-20px, 0, 0);   opacity: 0; }
    10%  { opacity: 0.9; }
    50%  { transform: translate3d(40px, -20px, 0); }
    100% { transform: translate3d(80px, 0, 0);   opacity: 0; }
}

/* Imlek (lanterns) */
.ck-imlek-layer {
    position: absolute;
    inset: 0;
    pointer-events: none;
}
.ck-imlek-lantern {
    position: absolute;
    bottom: -40px;
    width: 26px;
    height: 34px;
    background: radial-gradient(circle at 50% 20%, #ffd5aa, #ff2b2b);
    border-radius: 50% 50% 45% 45%;
    box-shadow: 0 0 12px rgba(255,80,80,0.9);
    animation: ck-imlek-rise 10s linear infinite;
}
.ck-imlek-lantern::after {
    content: "";
    position: absolute;
    bottom: -6px;
    left: 50%;
    width: 10px;
    height: 6px;
    transform: translateX(-50%);
    background: #c41717;
    border-radius: 0 0 8px 8px;
}
@keyframes ck-imlek-rise {
    0%   { transform: translate3d(0, 40px, 0); opacity: 0; }
    10%  { opacity: 1; }
    80%  { transform: translate3d(0, -60vh, 0); opacity: 0.9; }
    100% { transform: translate3d(0, -80vh, 0); opacity: 0; }
}

/* Waisak (lotus lights) */
.ck-waisak-layer {
    position: absolute;
    inset: 0;
    pointer-events: none;
}
.ck-waisak-light {
    position: absolute;
    bottom: -10px;
    width: 40px;
    height: 16px;
    border-radius: 50%;
    background: radial-gradient(circle at 50% 10%, #ffe8b3, #f3b54a);
    box-shadow:
      0 0 14px rgba(243,181,74,0.9),
      0 0 28px rgba(255,240,190,0.7);
    animation: ck-waisak-rise 12s ease-in-out infinite;
}
@keyframes ck-waisak-rise {
    0%   { transform: translate3d(0, 40px, 0); opacity: 0; }
    10%  { opacity: 0.8; }
    50%  { transform: translate3d(0, -30vh, 0); opacity: 1; }
    100% { transform: translate3d(0, -50vh, 0); opacity: 0; }
}

/* Nyepi (calm night sky) */
.ck-nyepi-layer {
    position: absolute;
    inset: 0;
    pointer-events: none;
}
.ck-nyepi-star {
    position: absolute;
    width: 2px;
    height: 2px;
    border-radius: 50%;
    background: #ffffff;
    opacity: 0.6;
    animation: ck-nyepi-twinkle 4s ease-in-out infinite;
}
@keyframes ck-nyepi-twinkle {
    0%, 100% { opacity: 0.1; transform: scale(0.6); }
    40%      { opacity: 0.9; transform: scale(1.4); }
}

/* Kemerdekaan (red & white confetti) */
.ck-independence-layer {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}
.ck-independence-piece {
    position: absolute;
    top: -10px;
    width: 4px;
    height: 14px;
    border-radius: 2px;
    background: linear-gradient(to bottom, #ff1744, #ffffff);
    animation: ck-independence-fall 6s linear infinite;
    opacity: 0.9;
}
@keyframes ck-independence-fall {
    0%   { transform: translate3d(0, -10px, 0) rotate(0deg);   opacity: 0; }
    10%  { opacity: 1; }
    100% { transform: translate3d(0, 110vh, 0) rotate(240deg); opacity: 0; }
}
/* === Padatkan tampilan di mobile === */
@media (max-width: 480px) {
    .wrapper {
        margin: 12px auto;   /* dari 30px */
        padding: 10px;       /* dari 20px */
    }

    .card {
        padding: 16px;       /* dari 24px */
    }

    .home-intro {
        padding: 0.75rem 0.9rem;  /* dari 1rem 1.25rem */
        line-height: 1.5;         /* sedikit lebih rapat */
        font-size: 0.9rem;        /* opsional: agak lebih kecil */
    }

    .home-intro-card {
        margin-bottom: 0.5rem;    /* kalau mau jarak ke grid di bawah lebih rapat */
    }
}