@import url("../../css/common.css");
@import url("../../css/animation.css");

html {
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
}

.with-scrollbar {
    scrollbar-width: auto !important;
    -ms-overflow-style: auto !important;
}

.font-esthetic {
    font-family: 'Sacramento', cursive !important;
}

.font-arabic {
    font-family: 'Noto Naskh Arabic', serif !important;
}

/* =====================================================================
   SPINNER EMAS (layar loading)
   Menggantikan logo gambar "U" bawaan proyek asal. SVG inline di
   themes/default/index.html, jadi tidak ada berkas gambar yang diunduh
   dan warna otomatis mengikuti --theme-primary.
   ===================================================================== */

@keyframes emas-putar {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.spinner-emas {
    width: 3.25rem;
    height: 3.25rem;
    margin-left: auto;
    margin-right: auto;
    color: var(--theme-primary, #c9a84c);
    animation: emas-putar 2.6s linear infinite;
}

@media (prefers-reduced-motion: reduce) {
    .spinner-emas {
        animation: none;
    }
}

.img-center-crop {
    width: 13rem;
    height: 13rem;
    max-width: 100%;
    max-height: 100%;
    object-fit: cover;
    object-position: center top;
}

html[data-bs-theme="dark"] .btn-transparent {
    background-color: rgba(var(--bs-dark-rgb), 0.5) !important;
    backdrop-filter: blur(0.5rem);
}

html[data-bs-theme="light"] .btn-transparent {
    background-color: rgba(var(--bs-light-rgb), 0.5) !important;
    backdrop-filter: blur(0.5rem);
}

/* --- Tombol bulat: audio & share ---
   .rounded-circle saja tidak cukup: btn-sm + ikon yang lebih lebar dari
   tinggi membuat tombol jadi oval. Kunci width/height sama besar lalu
   center ikon pakai flex.
   Sengaja TANPA !important pada display, supaya .d-none (Bootstrap, !important)
   tetap menyembunyikan tombol musik sampai JS menampilkannya. */
#button-share,
#button-music {
    width: 2.75rem;
    height: 2.75rem;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    flex: 0 0 auto;
}

#button-share i,
#button-music i {
    font-size: 1.05rem;
    line-height: 1;
}

.loading-page {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 1056;
}

html[data-bs-theme="light"] .color-theme-svg {
    color: white;
    background-color: rgb(var(--bs-light-rgb));
}

html[data-bs-theme="dark"] .color-theme-svg {
    color: black;
    background-color: rgb(var(--bs-dark-rgb));
}

html[data-bs-theme="light"] .bg-light-dark {
    background-color: rgb(var(--bs-light-rgb));
}

html[data-bs-theme="dark"] .bg-light-dark {
    background-color: rgb(var(--bs-dark-rgb));
}

html[data-bs-theme="light"] .bg-white-black {
    background-color: rgb(var(--bs-white-rgb));
}

html[data-bs-theme="dark"] .bg-white-black {
    background-color: rgb(var(--bs-black-rgb));
}

.bg-cover-home {
    width: 100%;
    height: 100%;
    object-fit: cover;
    mask-image: linear-gradient(0.5turn, transparent, black 40%, black 60%, transparent);
}

.width-loading {
    width: 25%;
}

.cursor-pointer {
    cursor: pointer;
}

@media screen and (max-width: 992px) {
    .width-loading {
        width: 50%;
    }
}

@media screen and (max-width: 576px) {
    .width-loading {
        width: 75%;
    }
}

svg {
    display: block;
    line-height: 0;
    shape-rendering: geometricPrecision;
    backface-visibility: hidden;
}

.svg-wrapper {
    overflow: hidden !important;
    transform: translateZ(0) !important;
}

.no-gap-bottom {
    margin-bottom: -0.75rem !important;
}

/* Theme color variables (set dynamically by JS from theme_colors) */
:root {
    --theme-primary: #c9a84c;
    --theme-secondary: #8b6914;
    --theme-accent: #f5e6b8;
    --theme-background: #fffaf0;
}

body {
    background-color: var(--theme-background);
}

html[data-bs-theme="dark"] body {
    background-color: rgb(var(--bs-dark-rgb));
}

html[data-bs-theme="light"] body {
    background-color: var(--theme-background);
}

h1, h2, h3, h4, h5, h6 {
    color: var(--theme-primary);
}

html[data-bs-theme="dark"] h1, html[data-bs-theme="dark"] h2,
html[data-bs-theme="dark"] h3, html[data-bs-theme="dark"] h4,
html[data-bs-theme="dark"] h5, html[data-bs-theme="dark"] h6 {
    color: rgb(var(--bs-light-rgb));
}

html[data-bs-theme="light"] h1, html[data-bs-theme="light"] h2,
html[data-bs-theme="light"] h3, html[data-bs-theme="light"] h4,
html[data-bs-theme="light"] h5, html[data-bs-theme="light"] h6 {
    color: var(--theme-primary);
}

.font-esthetic {
    color: var(--theme-primary);
}

html[data-bs-theme="dark"] .font-esthetic {
    color: rgb(var(--bs-light-rgb));
}

html[data-bs-theme="light"] .font-esthetic {
    color: var(--theme-primary);
}

hr {
    border-color: var(--theme-accent) !important;
}

.btn-outline-primary {
    color: var(--theme-primary);
    border-color: var(--theme-primary);
}

.btn-outline-primary:hover {
    background-color: var(--theme-primary);
    border-color: var(--theme-primary);
    color: #fff;
}

.bg-theme-auto {
    background-color: var(--theme-background);
}

.text-theme-auto {
    color: var(--theme-primary);
}

/* Gallery Grid - variatif seperti Pinterest/Instagram */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: 8rem;
    grid-auto-flow: dense;
    gap: 0.6rem;
}

.gallery-item {
    overflow: hidden;
    border-radius: 0.75rem;
    position: relative;
    cursor: pointer;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    display: block;
    transition: transform 0.4s ease;
}

.gallery-item:hover img {
    transform: scale(1.08);
}

.gallery-item .gallery-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.65) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: flex-end;
    padding: 0.75rem;
    pointer-events: none;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-item .gallery-overlay span {
    color: #fff;
    font-size: 0.8rem;
    line-height: 1.3;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.gallery-item.tall {
    grid-row: span 2;
}

.gallery-item.wide {
    grid-column: span 2;
}

.gallery-item.big {
    grid-column: span 2;
    grid-row: span 2;
}

@media (min-width: 576px) {
    .gallery-grid {
        grid-template-columns: repeat(4, 1fr);
        grid-auto-rows: 10rem;
        gap: 0.75rem;
    }
}

@media (min-width: 992px) {
    .gallery-grid {
        grid-template-columns: repeat(4, 1fr);
        grid-auto-rows: 12rem;
        gap: 1rem;
    }
}

/* --- Footer: link WhatsApp (hanya, github/status/music dibiarkan) --- */
[data-bind="footer-links"] a[href^="https://wa.me/"] {
    color: #fff;
    font-weight: 700;
    text-decoration: none;
}

[data-bind="footer-links"] a[href^="https://wa.me/"]:hover,
[data-bind="footer-links"] a[href^="https://wa.me/"]:focus {
    color: #fff;
    text-decoration: none;
}

/* ==========================================
   PLAYFUL THEME
   Inspired by mer.id/tema/playful
   - Bubbly, rounded, fun vibe
   - Grass/leaf decorative elements
   - Alternating tinted sections
   - Playful typography
   ========================================== */
html.theme-playful {
    --playful-radius: 1.75rem;
    --playful-radius-sm: 1rem;
    --playful-radius-xs: 0.75rem;
}

/* --- Rounded corners everywhere --- */
html.theme-playful section {
    border-radius: var(--playful-radius) !important;
    margin-left: 0.5rem;
    margin-right: 0.5rem;
    margin-bottom: 1rem;
}

html.theme-playful section#home {
    border-radius: 0 0 var(--playful-radius) var(--playful-radius) !important;
}

html.theme-playful section#bride {
    border-radius: var(--playful-radius) !important;
}

html.theme-playful section#bride + .svg-wrapper {
    display: none;
}

html.theme-playful .card,
html.theme-playful .section-card,
html.theme-playful section > .container > .row > [class*="col-"] > .card,
html.theme-playful [class*="rounded"]:not(img):not(iframe):not(.gallery-item) {
    border-radius: var(--playful-radius) !important;
}

html.theme-playful .btn,
html.theme-playful button:not(.nav-link):not(.carousel-control) {
    border-radius: 2rem !important;
}

html.theme-playful .gallery-item {
    border-radius: var(--playful-radius-sm) !important;
}

html.theme-playful .gallery-item .gallery-overlay {
    border-radius: var(--playful-radius-sm) !important;
}

html.theme-playful #cover {
    border-radius: 0 0 var(--playful-radius) var(--playful-radius);
}

html.theme-playful .rounded-4 {
    border-radius: var(--playful-radius) !important;
}

html.theme-playful .border.rounded-pill {
    border-radius: 2rem !important;
}

/* --- Body background with playful dots --- */
html.theme-playful body {
    background-image:
        radial-gradient(circle at 10% 20%, rgba(255, 107, 107, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 90% 80%, rgba(78, 205, 196, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(255, 230, 109, 0.06) 0%, transparent 50%);
}

/* --- Alternating section tints --- */
html.theme-playful section.bg-light-dark:nth-of-type(odd) {
    background-color: rgba(255, 107, 107, 0.04);
}

html.theme-playful section.bg-light-dark:nth-of-type(even) {
    background-color: rgba(78, 205, 196, 0.04);
}

html.theme-playful section.bg-white-black:nth-of-type(odd) {
    background-color: rgba(255, 230, 109, 0.03);
}

/* --- Typography --- */
html.theme-playful .font-esthetic {
    letter-spacing: 0.03em;
    font-weight: 500;
}

html.theme-playful h1, html.theme-playful h2, html.theme-playful h3 {
    text-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

/* --- Decorative grass/leaf elements on cover --- */
html.theme-playful section#home {
    position: relative;
    overflow: hidden;
}

html.theme-playful section#home::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 60'%3E%3Cpath d='M0,30 Q80,0 160,25 Q240,50 320,20 Q400,-10 480,20 Q560,50 640,15 Q720,-20 800,18 Q880,56 960,22 Q1040,-12 1120,25 Q1160,42 1200,30 L1200,60 L0,60 Z' fill='%23FF6B6B' opacity='0.12'/%3E%3Cpath d='M0,45 Q100,20 200,38 Q300,56 400,30 Q500,4 600,35 Q700,66 800,28 Q900,-10 1000,32 Q1100,74 1200,40 L1200,60 L0,60 Z' fill='%234ECDC4' opacity='0.10'/%3E%3C/svg%3E") no-repeat bottom;
    background-size: 100% 60px;
    pointer-events: none;
    z-index: 2;
}

html.theme-playful section#home::after {
    content: '🌿';
    position: absolute;
    bottom: 10px;
    left: 10%;
    font-size: 1.5rem;
    opacity: 0.4;
    z-index: 3;
    pointer-events: none;
    transform: rotate(-10deg);
}

/* Leaf decor bottom-right */
html.theme-playful section#home .position-relative.text-center::after {
    content: '🌿';
    position: absolute;
    bottom: -20px;
    right: 5%;
    font-size: 2rem;
    opacity: 0.3;
    pointer-events: none;
    transform: rotate(20deg) scaleX(-1);
}

/* --- Playful cover photo border --- */
html.theme-playful #home img.rounded-circle {
    border-width: 4px !important;
    border-color: var(--theme-primary, #FF6B6B) !important;
    box-shadow: 0 4px 20px rgba(255, 107, 107, 0.25) !important;
}

/* --- Wavy SVG separator colors --- */
html.theme-playful .svg-wrapper .color-theme-svg path {
    fill: var(--theme-primary, #FF6B6B) !important;
}

/* --- Couple photos with playful border --- */
html.theme-playful #bride img.rounded-circle {
    border-width: 4px !important;
    border-color: var(--theme-secondary, #4ECDC4) !important;
    box-shadow: 0 4px 20px rgba(78, 205, 196, 0.25) !important;
}

/* --- Love story card --- */
html.theme-playful #stories-container .bg-theme-auto {
    background-color: var(--theme-secondary, #4ECDC4) !important;
    color: #fff !important;
}

/* --- Event cards --- */
html.theme-playful #events-container > div {
    background: rgba(255, 107, 107, 0.05);
    border-radius: var(--playful-radius-sm) !important;
    margin: 0.75rem 0;
    padding: 1rem;
}

/* --- Gift accounts --- */
html.theme-playful #gift-accounts-section .card {
    border: 2px solid rgba(78, 205, 196, 0.2) !important;
    transition: transform 0.2s ease;
}

html.theme-playful #gift-accounts-section .card:hover {
    transform: scale(1.02);
}

/* --- Bouncy button hover --- */
html.theme-playful .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transition: all 0.2s ease;
}

/* --- Live stream section --- */
html.theme-playful #live-stream-section .btn {
    border-radius: 1rem !important;
    border-width: 2px;
}

/* --- Comment section --- */
html.theme-playful #comments-section .card {
    border: none !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

/* --- Map iframe --- */
html.theme-playful iframe[src*="maps.google"] {
    border-radius: var(--playful-radius-sm) !important;
}

/* --- Fun love animation colors --- */
html.theme-playful svg.animate-love {
    fill: var(--theme-primary, #FF6B6B) !important;
}

/* --- Desktop sidebar --- */
html.theme-playful .bg-white-black.d-flex.justify-content-center.align-items-center.vh-100 {
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.05) 0%, rgba(78, 205, 196, 0.05) 100%) !important;
}

html.theme-playful .bg-white-black.d-flex .bg-overlay-auto.rounded-5 {
    backdrop-filter: blur(12px);
    background: rgba(255, 255, 255, 0.85) !important;
    border: 2px solid rgba(255, 107, 107, 0.15);
}

/* --- Navbar menu active state --- */
html.theme-playful .nav-link.active {
    color: var(--theme-primary, #FF6B6B) !important;
}

/* ============================================================
 *  Aturan dasar yang sebelumnya hanya ada di css/common.css.
 *  File itu tidak dimuat oleh tema ini, akibatnya:
 *    - navbar bawah kehilangan efek blur (backdrop-filter)
 *    - .btn-outline-auto kehilangan warna, teksnya terang di atas
 *      latar transparan sehingga tampak abu dan tak terlihat
 *    - #stories-container.story-blur tidak menjalankan blur reveal
 *  Disalin di bawah agar tema ini mandiri.
 * ============================================================ */

html[data-bs-theme="dark"] .navbar,
html[data-bs-theme="light"] .navbar {
    backdrop-filter: blur(0.5rem);
}

html[data-bs-theme="dark"] .navbar {
    background-color: rgba(var(--bs-dark-rgb), 0.75) !important;
}

html[data-bs-theme="light"] .navbar {
    background-color: rgba(var(--bs-light-rgb), 0.75) !important;
}

/* --- Tombol .btn-outline-auto --- */
html[data-bs-theme="dark"] .btn-outline-auto {
    --bs-btn-color: var(--bs-light);
    --bs-btn-border-color: var(--bs-light);
    --bs-btn-hover-color: var(--bs-black);
    --bs-btn-hover-bg: var(--bs-light);
    --bs-btn-hover-border-color: var(--bs-light);
    --bs-btn-focus-shadow-rgb: var(--bs-light-rgb);
    --bs-btn-active-color: var(--bs-black);
    --bs-btn-active-bg: var(--bs-light);
    --bs-btn-active-border-color: var(--bs-light);
    --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
    --bs-btn-disabled-color: var(--bs-light);
    --bs-btn-disabled-bg: transparent;
    --bs-btn-disabled-border-color: var(--bs-light);
    --bs-gradient: none;
}

html[data-bs-theme="light"] .btn-outline-auto {
    --bs-btn-color: var(--bs-dark);
    --bs-btn-border-color: var(--bs-dark);
    --bs-btn-hover-color: var(--bs-white);
    --bs-btn-hover-bg: var(--bs-dark);
    --bs-btn-hover-border-color: var(--bs-dark);
    --bs-btn-focus-shadow-rgb: var(--bs-dark-rgb);
    --bs-btn-active-color: var(--bs-white);
    --bs-btn-active-bg: var(--bs-dark);
    --bs-btn-active-border-color: var(--bs-dark);
    --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
    --bs-btn-disabled-color: var(--bs-dark);
    --bs-btn-disabled-bg: transparent;
    --bs-btn-disabled-border-color: var(--bs-dark);
    --bs-gradient: none;
}

/* --- Love Story: blur reveal --- */
#stories-container {
    transition: filter 0.45s ease;
}

#stories-container.story-blur {
    filter: blur(8px) contrast(88%);
    pointer-events: none;
}

#stories-container.story-reveal {
    filter: blur(0) contrast(100%);
}

/* --- Turut Mengundang --- */
#turut-mengundang-section .turut-mengundang-wrap {
    padding: 1.5rem 1rem;
    border-radius: 1rem;
    border: 1px solid rgba(201, 168, 76, 0.35);
    background: rgba(0, 0, 0, 0.25);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(6px);
}

html[data-bs-theme="light"] #turut-mengundang-section .turut-mengundang-wrap {
    background: rgba(255, 255, 255, 0.75);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.06);
}

#turut-mengundang-section .turut-mengundang-category {
    font-size: 1.1rem;
    color: var(--theme-primary, #c9a84c);
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

#turut-mengundang-section .turut-mengundang-name {
    font-size: 0.95rem;
    line-height: 1.6;
}