@import url("common.css");
@import url("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;
}

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

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);
}

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

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

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

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;
}

/* ===== Story Timeline ===== */
.story-play-btn {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.story-play-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 0 0 8px rgba(255, 255, 255, 0.15), 0 8px 25px rgba(0, 0, 0, 0.3) !important;
}

.story-timeline {
    position: relative;
    padding-left: 28px;
}

.story-timeline::before {
    content: '';
    position: absolute;
    left: 11px;
    top: 8px;
    bottom: 8px;
    width: 2px;
    background: linear-gradient(to bottom, var(--bs-primary), rgba(var(--bs-primary-rgb), 0.2));
    border-radius: 2px;
}

.story-timeline-item {
    position: relative;
    padding-bottom: 1.25rem;
}

.story-timeline-item:last-child {
    padding-bottom: 0;
}

.story-timeline-dot {
    position: absolute;
    left: -28px;
    top: 2px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--bs-primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 0 4px rgba(var(--bs-primary-rgb), 0.15);
    z-index: 1;
}

.story-timeline-content {
    padding: 0.75rem 1rem;
    border-radius: 12px;
    background: rgba(var(--bs-emphasis-color-rgb), 0.03);
    border: 1px solid rgba(var(--bs-emphasis-color-rgb), 0.06);
}

/* ===== Gallery Grid ===== */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: 180px;
    gap: 8px;
}

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

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

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

.gallery-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

.gallery-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0);
    transition: background 0.3s ease;
    pointer-events: none;
}

.gallery-overlay i {
    color: white;
    font-size: 1.3rem;
    opacity: 0;
    transform: scale(0.5);
    transition: all 0.3s ease;
}

.gallery-item:hover .gallery-overlay,
.gallery-item:active .gallery-overlay {
    background: rgba(0, 0, 0, 0.3);
}

.gallery-item:hover .gallery-overlay i,
.gallery-item:active .gallery-overlay i {
    opacity: 1;
    transform: scale(1);
}

@media screen and (max-width: 576px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: 150px;
        gap: 6px;
    }

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

/* ===== Chat Styles ===== */
#chat-overlay {
    animation: chatSlideIn 0.3s ease;
}

@keyframes chatSlideIn {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

html[data-bs-theme="light"] .bg-chat-pattern {
    background-color: #ece5dd;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23000000' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

html[data-bs-theme="dark"] .bg-chat-pattern {
    background-color: #0b141a;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.chat-bubble-left {
    background-color: var(--bs-body-bg);
    border: 1px solid rgba(var(--bs-emphasis-color-rgb), 0.08);
    border-top-left-radius: 4px !important;
}

.chat-bubble-right {
    background-color: var(--bs-primary);
    color: #fff;
    border-top-right-radius: 4px !important;
}

.chat-bubble-right .chat-bubble-time {
    color: rgba(255,255,255,0.6) !important;
}

.chat-bubble-right .chat-bubble-time i {
    color: rgba(255,255,255,0.8) !important;
}

.chat-bubble-admin {
    background-color: var(--bs-body-bg);
    border: 1px solid rgba(var(--bs-emphasis-color-rgb), 0.08);
    border-left: 3px solid #f59e0b;
    border-top-left-radius: 4px !important;
}

.chat-bubble-name {
    color: #667eea;
}

.chat-bubble-text {
    font-size: 0.9rem;
    line-height: 1.4;
    word-break: break-word;
}

.chat-music-request {
    background: rgba(102, 126, 234, 0.08);
    border: 1px solid rgba(102, 126, 234, 0.15);
}

.chat-input-bar {
    box-shadow: 0 -1px 3px rgba(0,0,0,0.08);
}

/* Emoji Picker */
#emoji-picker-panel {
    box-shadow: 0 -2px 8px rgba(0,0,0,0.1);
}

.emoji-picker-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2px;
}

.emoji-item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.15s ease;
    border: none !important;
    background: none !important;
}

.emoji-item:hover {
    transform: scale(1.3);
}

.emoji-item:active {
    transform: scale(0.9);
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* RSVP Modal */
#modal-rsvp .modal-fullscreen {
    background: transparent;
}

#modal-rsvp .rsvp-choice {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#modal-rsvp .rsvp-choice:hover {
    transform: scale(1.03);
}

#modal-rsvp .rsvp-choice:active {
    transform: scale(0.97);
}

#modal-rsvp .modal-content {
    animation: rsvpSlideUp 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes rsvpSlideUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}