/* =========================================
   UX VARIANTS STYLES (index1.php & index2.php)
   ========================================= */

/* --- VARIANT 1: SIDEBAR (index1.php) --- */
.ux-sidebar {
    position: fixed;
    top: 0;
    right: -450px; /* Hidden by default */
    width: 400px;
    height: 100vh;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: -5px 0 20px rgba(0,0,0,0.15);
    z-index: 100000;
    transition: right 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
}

.ux-sidebar.open {
    right: 0;
}

.ux-sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.ux-sidebar-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
}

.ux-sidebar-close:hover {
    color: #000;
}

/* Mobile responsive for sidebar */
@media (max-width: 768px) {
    .ux-sidebar {
        width: 100%;
        height: 60vh;
        top: auto;
        bottom: -60vh; /* Slide up from bottom on mobile */
        right: 0;
        border-radius: 20px 20px 0 0;
        transition: bottom 0.3s ease-out;
    }
    
    .ux-sidebar.open {
        bottom: 0;
        right: 0;
    }
}

/* --- VARIANT 2: CONTEXTUAL POPUP (index2.php) --- */
.leaflet-popup-content-wrapper {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(10px);
    border-radius: 14px !important;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15) !important;
}

.leaflet-popup-content {
    margin: 15px !important;
    min-width: 280px;
}

.ux-contextual-card {
    text-align: center;
}

.ux-contextual-card h5 {
    font-weight: 700;
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.ux-contextual-card .btn {
    width: 100%;
    margin-top: 15px;
    border-radius: 8px;
}

/* Auth forms embedded inside contextual popup or sidebar */
.ux-embedded-auth {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.ux-embedded-auth input {
    margin-bottom: 10px;
}

/* User Dashboard Sidebar View */
#sb-dashboard-view .card {
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
    transition: transform 0.2s, box-shadow 0.2s;
}

#sb-dashboard-view .card:hover {
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}

#sb-dashboard-view label {
    font-size: 0.72rem;
    text-transform: uppercase;
    font-weight: 700;
    color: #888;
    margin-bottom: 4px;
    letter-spacing: 0.5px;
}

#sb-dashboard-view .card-title {
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 8px;
    margin-bottom: 15px;
}

/* uniCoin gold coin */
.fa-coins {
    color: #d4af37;
    text-shadow: 0 0 2px rgba(212, 175, 55, 0.3);
}

/* Pulse animation for the search input */
.search-pulse-glow {
    animation: searchPulse 1.5s infinite alternate;
}

@keyframes searchPulse {
    0% {
        box-shadow: 0 0 5px rgba(13, 110, 253, 0.4);
        border-color: #0d6efd;
    }
    100% {
        box-shadow: 0 0 20px rgba(13, 110, 253, 0.9);
        border-color: #0d6efd;
        transform: scale(1.02);
    }
}

/* Ensure Bootstrap modals are on top of details cards and sidebar */
.modal {
    z-index: 105000 !important;
}
.modal-backdrop {
    z-index: 104900 !important;
}
