/* Custom Global Font Fallbacks */
html, body {
    max-width: 100vw;
    overflow-x: hidden;
}

body {
    font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
}

/* Unified Premium Scrollbar for all pages */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background-color: #cbd5e1;
    border-radius: 9999px;
    border: 1px solid transparent;
    background-clip: content-box;
}
::-webkit-scrollbar-thumb:hover {
    background-color: #94a3b8;
}

/* Force vertical focus on main layout */
.admin-view {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

/* Table container responsiveness */
.responsive-table-container {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin; /* Firefox */
    padding-bottom: 0.5rem;
}
.responsive-table-container::-webkit-scrollbar {
    height: 6px;
    display: block;
}
.responsive-table-container::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.02);
    border-radius: 9999px;
}
.responsive-table-container::-webkit-scrollbar-thumb {
    background-color: #cbd5e1;
    border-radius: 9999px;
}
.responsive-table-container::-webkit-scrollbar-thumb:hover {
    background-color: #94a3b8;
}

/* Global utility classes */
/* Premium Custom Scrollbar - Inset & Floating */
.premium-scrollbar::-webkit-scrollbar {
    width: 10px;
}

.premium-scrollbar::-webkit-scrollbar-track {
    background: transparent;
    margin: 20px 0;
}

.premium-scrollbar:hover::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.01);
}

.premium-scrollbar::-webkit-scrollbar-thumb {
    background-color: #64748b;
    border: 3px solid transparent; 
    background-clip: content-box;
    border-radius: 999px;
}

.premium-scrollbar::-webkit-scrollbar-thumb:hover {
    background-color: #00b8d4;
}

/* Responsive spacing adjustments */
@media (max-width: 640px) {
    .admin-view {
        padding-bottom: 5rem;
    }
    .responsive-table-container th,
    .responsive-table-container td {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
        white-space: nowrap;
    }
}

.no-scrollbar::-webkit-scrollbar {
    display: none;
}
.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.site-name-display {
    color: #ff2d55 !important;
    background: linear-gradient(to right, #ff2d55, #00b8d4) !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
}

/* Navigation — seller sidebar uses .seller-nav-btn in seller.html inline styles */
#seller-sidebar .tab-btn:not(.seller-nav-btn):not(.seller-nav-active):hover {
    background-color: #f8fafc;
}

.nav-link:hover {
    color: #10b981;
}
.category-pill:hover {
    background-color: #ecfdf5;
    border-color: #10b981;
}

/* Glassmorphism */
.glass-header {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

/* Ambient Glows */
.glow-orange {
    box-shadow: 0 10px 30px -10px rgba(249, 115, 22, 0.3);
}
.glow-emerald {
    box-shadow: 0 10px 30px -10px rgba(16, 185, 129, 0.3);
}

/* Form transition styles */
.form-container {
    transition: all 0.5s ease-in-out;
}

/* Table row visual feedback (Admin dashboard) */
tr {
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
tr:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px -2px rgba(15, 23, 42, 0.015);
}
.no-scrollbar::-webkit-scrollbar { display: none; } .no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

/* Active sidebar tab hover state overrides (Admin dashboards) */
.admin-tab-btn.bg-indigo-600:hover,
.admin-tab-btn[style*="background-color"]:hover {
    background-color: #e6224d !important;
    color: #ffffff !important;
    box-shadow: 0 10px 15px -3px rgba(255, 45, 85, 0.2), 0 4px 6px -2px rgba(255, 45, 85, 0.1) !important;
}

/* Ensure inner icons/divs do not change behavior for active elements on hover */
.admin-tab-btn.bg-indigo-600:hover div,
.admin-tab-btn[style*="background-color"]:hover div {
    background-color: rgba(30, 41, 59, 0.5) !important; /* bg-slate-800/50 */
}

/* Prevent inner icons from turning other colors on active hover */
.admin-tab-btn.bg-indigo-600:hover svg,
.admin-tab-btn[style*="background-color"]:hover svg {
    color: #ffffff !important;
    stroke: currentColor !important;
}

/* Elegant Button Loading Animation System */
.btn-loading {
    position: relative;
    pointer-events: none !important;
    opacity: 0.82 !important;
    user-select: none;
}

.btn-spinner {
    display: inline-block;
    width: 1.15em;
    height: 1.15em;
    border: 2px solid currentColor;
    border-top-color: transparent;
    border-radius: 50%;
    animation: btn-loading-spin 0.6s linear infinite;
    margin-right: 0.5rem;
    vertical-align: middle;
    flex-shrink: 0;
}

@keyframes btn-loading-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Index hero slider: max 480px tall, full image visible (no side crop) */
#hero-slider-section {
    max-width: 1920px;
    width: 100%;
}

#hero-slider .hero-slide {
    width: 100%;
    flex: 0 0 100%;
    max-height: 480px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(248, 250, 252, 0.5);
    overflow: hidden;
}

/* Live chat image messages — smart fit, never clip */
.chat-image-bubble {
    max-width: 280px;
    padding: 0;
    overflow: visible;
    box-shadow: none;
    background: transparent;
}

.chat-image-bubble-admin,
.chat-image-bubble-peer,
.chat-image-bubble-incoming {
    background: transparent;
}

.chat-image-bubble-user,
.chat-image-bubble-self,
.chat-image-bubble-outgoing {
    background: transparent;
}

.chat-image-frame {
    display: block;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 0.875rem;
    padding: 6px;
    overflow: visible;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
    line-height: 0;
}

.chat-image-bubble-outgoing .chat-image-frame {
    border-top-right-radius: 0.25rem;
}

.chat-image-bubble-incoming .chat-image-frame {
    border-top-left-radius: 0.25rem;
}

.chat-image-wrap {
    display: block;
    line-height: 0;
    overflow: visible;
    border-radius: 0.625rem;
    max-width: 100%;
}

.chat-image-msg {
    display: block;
    width: auto;
    height: auto;
    max-width: 260px;
    max-height: 280px;
    object-fit: contain;
    object-position: center center;
    border-radius: 0.625rem;
    cursor: pointer;
}

.chat-image-time {
    display: block;
    font-size: 9px;
    font-weight: 700;
    margin-top: 6px;
    padding: 0 2px;
    line-height: 1.3;
}

.chat-image-time-outgoing {
    text-align: right;
    color: #94a3b8;
}

.chat-image-time-incoming {
    text-align: left;
    color: #94a3b8;
}

#admin-chat-messages {
    overflow-x: hidden;
    overflow-y: auto;
    padding-bottom: 1.5rem;
}

#admin-chat-messages .chat-image-row {
    flex-shrink: 0;
    min-height: 0;
}

#admin-chat-messages .chat-image-bubble {
    max-width: 280px;
}

#admin-chat-messages .chat-image-msg,
#admin-chat-messages .chat-image-msg-admin {
    max-width: 260px;
    max-height: 280px;
    object-fit: contain;
}

#user-chat-messages .chat-image-bubble {
    max-width: 220px;
}

#user-chat-messages .chat-image-msg {
    max-width: 200px;
    max-height: 220px;
}

#user-chat-messages .chat-image-bubble,
#admin-chat-messages .chat-image-bubble {
    flex-shrink: 0;
}

#hero-slider .hero-slide-img {
    display: block;
    width: 100%;
    max-width: 1920px;
    max-height: 480px;
    height: auto;
    object-fit: contain;
    object-position: center;
}


