/* ========================================
   IMPORTS & FONT DECLARATIONS
======================================== */
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=swap");
@import "./base/_variables.css";
@import "./animation/_fade-animation.css";
@import "./animation/_bounce.css";
@import "./animation/_spin.css";
@import "./animation/_blink.css";
@import "./partials/_shimmer.css";
@import "./partials/_selectioncard.css";
@import "./partials/_dropdown.css";
@import "./partials/_order.css";
@import "./partials/_scrollbar.css";
@import "./partials/_glyphExtractor.css";
@import "./partials/_button.css";
@import "./partials/_f-icon.css";
@import "./partials/_notification.css";
@import "./partials/_google.css";
@import "./partials/_steps.css";
@import "./partials/_pills.css";
@import "./partials/_slider.css";
@import "./partials/_loader.css";
@import "./partials/_settings.css";
@import "./partials/_drop.css";
@import "./partials/_bark.css";
@import "./partials/_product.css";
@import "./partials/_dev.css";

/* ========================================
   BASE STYLES & TYPOGRAPHY
======================================== */
body,
html {
    background: var(--color-bg);
    color: var(--color-text-primary);
    font-family: var(--font-family-main) !important;
    margin: 0;
    padding: 0;
}

* {
    font-family: "Inter", Arial, sans-serif !important;
}

/* Primary text */
h1,
h2,
h3,
.stat-number {
    color: var(--color-text-primary);
}

/* Secondary text */
label,
.text-secondary,
.stat-label,
small,
.subtitle {
    color: var(--color-text-secondary);
}

/* ========================================
   LAYOUT COMPONENTS
======================================== */

/* Card/Widget backgrounds */
.card,
.panel {
    background: var(--color-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.widget {
    background-color: rgba(112, 112, 112, 0.02); /* bg-white/[0.02] */
    border-width: 1px; /* border */
    border-style: solid; /* border */
    border-color: rgba(255, 255, 255, 0.05); /* border-white/5 */
    border-radius: 0.5rem; /* rounded-lg */
    padding: 1rem; /* p-4 */
}

/* Card header with accent line */
.card-header {
    border-bottom: 2px solid var(--color-accent);
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}

/* Accent and secondary lines */
.accent-line {
    border-bottom: 2px solid var(--color-accent);
}

.secondary-line {
    border-bottom: 2px solid var(--color-secondary);
}

/* ========================================
   NAVIGATION & INTERACTIVE ELEMENTS
======================================== */

/* Sidebar/interactive elements */
.sidebar a,
.button,
.nav-link {
    color: var(--color-text-primary);
    background: transparent;
    transition: background 0.2s, color 0.2s;
}

.sidebar a:hover,
.button:hover,
.nav-link.active {
    background: var(--color-hover);
    color: var(--color-text-primary);
}

/* ========================================
   TAB SYSTEMS
======================================== */

/* Product tabs */
.product-tab.active {
    background: var(--color-bar) !important;
    color: var(--color-text-primary) !important;
}
.product-tab:hover {
    background: var(--color-hover-secondary) !important;
    color: var(--color-text-primary) !important;
}

/* User tabs */
.user-tab.active {
    background: var(--color-bar) !important;
    color: var(--color-text-primary) !important;
}
.user-tab:hover {
    background: var(--color-hover-secondary) !important;
    color: var(--color-text-primary) !important;
}

/* Product Status Tabs */
.product-status-tab {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.25rem 1.2rem;
    border-radius: 0.75rem;
    border-width: 2.5px;
    font-weight: 600;
    font-size: 0.85rem;
    text-align: center;
    user-select: none;
    min-height: 20px;
    box-shadow: 0 1px 4px 0 rgba(0, 0, 0, 0.08);
    transition: background 0.2s, color 0.2s, border-color 0.2s, border-width 0.2s;
    margin: 0;
    border-style: solid;
}

.tab-featured {
    border-color: rgba(236, 72, 153, 0.35);
    background: transparent;
    color: #ec4899;
}
.tab-featured.active {
    background: rgba(236, 72, 153, 0.13);
    color: #ec4899;
    border-color: #ec4899;
    border-width: 2.5px;
}

.tab-bestseller {
    border-color: rgba(34, 197, 94, 0.35);
    background: transparent;
    color: #22c55e;
}
.tab-bestseller.active {
    background: rgba(34, 197, 94, 0.13);
    color: #22c55e;
    border-color: #22c55e;
    border-width: 2.5px;
}

.tab-newproduct {
    border-color: rgba(250, 204, 21, 0.35);
    background: transparent;
    color: #facc15;
}
.tab-newproduct.active {
    background: rgba(250, 204, 21, 0.13);
    color: #facc15;
    border-color: #facc15;
    border-width: 2.5px;
}

/* Dropdown Tab Button */
.dropdown-tab-btn {
    padding: 0.5rem 1.2rem;
    border-radius: 0.5rem;
    background: #18181b;
    color: #fff;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}
.dropdown-tab-btn.active {
    background: #facc15;
    color: #18181b;
}

/* ========================================
   SEARCH BAR COMPONENTS
======================================== */

/* Product Search Bar */
.product-search-bar {
    display: flex;
    align-items: center;
    gap: 0;
    background: transparent;
    border-radius: var(--radius);
    box-shadow: none;
    overflow: hidden;
    width: 100%;
    max-width: none;
    margin: 0 0 1.5rem 0;
    border: 1.5px solid var(--color-accent);
}

.product-search-bar input[type="text"] {
    flex: 1 1 0%;
    border: none;
    outline: none;
    background: transparent;
    color: var(--color-text-primary);
    padding: 0.85rem 1.1rem;
    font-size: 1rem;
    border-radius: 0;
}

.product-search-bar input[type="text"]::placeholder {
    color: var(--color-text-secondary);
    opacity: 1;
}

.product-search-bar button {
    background: var(--color-accent);
    color: #fff;
    border: none;
    padding: 0.85rem 1.3rem;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    border-radius: 0;
    transition: background 0.18s;
    box-shadow: none;
}

.product-search-bar button:hover,
.product-search-bar button:focus {
    background: #7c3aed;
}

/* User Search Bar */
.user-search-bar {
    display: flex;
    align-items: center;
    gap: 0;
    background: transparent;
    border-radius: var(--radius);
    box-shadow: none;
    overflow: hidden;
    width: 100%;
    max-width: none;
    margin: 0 0 1.5rem 0;
    border: 1.5px solid var(--color-accent);
}

.user-search-bar input[type="text"] {
    flex: 1 1 0%;
    border: none;
    outline: none;
    background: transparent;
    color: var(--color-text-primary);
    padding: 0.85rem 1.1rem;
    font-size: 1rem;
    border-radius: 0;
}

.user-search-bar input[type="text"]::placeholder {
    color: var(--color-text-secondary);
    opacity: 1;
}

.user-search-bar button {
    background: var(--color-accent);
    color: #fff;
    border: none;
    padding: 0.85rem 1.3rem;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    border-radius: 0;
    transition: background 0.18s;
    box-shadow: none;
}

.user-search-bar button:hover,
.user-search-bar button:focus {
    background: #7c3aed;
}

/* ========================================
   TABLE COMPONENTS
======================================== */

/* Table header hover effect */
thead th.table-head-hover {
    font-size: 1.1rem;
    transition: color 0.2s, font-size 0.2s;
    cursor: pointer;
}
thead th.table-head-hover:hover {
    color: var(--color-accent);
    font-size: 1.18rem;
}

/* Table row hover effect */
tbody tr.table-row-hover {
    transition: background 0.2s;
    cursor: pointer;
}
tbody tr.table-row-hover:hover {
    background: var(--color-bar);
    color: var(--color-text-primary);
}

/* Clickable table cells */
.order-id-cell,
.product-sku-cell,
.user-id-cell {
    transition: background 0.2s, color 0.2s, border-radius 0.2s;
    cursor: pointer;
}
.order-id-cell:hover,
.product-sku-cell:hover,
.user-id-cell:hover {
    background: var(--color-hover);
}

/* ========================================
   BUTTONS & ACTION ELEMENTS
======================================== */

/* ========================================
   CHART & DATA VISUALIZATION
======================================== */

/* Bar chart color */
.bar {
    background: var(--color-bar);
}

/* Chart legend dots */
.legend-dot.accent {
    background: var(--color-accent);
}
.legend-dot.secondary {
    background: var(--color-secondary);
}
.legend-dot.bar {
    background: var(--color-bar);
}

/* ========================================
   MODAL & PANEL SYSTEMS
======================================== */

/* ========================================
   UTILITY CLASSES
======================================== */

/* Background utilities */
.bg-card {
    background: var(--color-card) !important;
}

/* Text utilities */
.text-primary {
    color: var(--color-text-primary) !important;
}
.text-secondary {
    color: var(--color-text-secondary) !important;
}

/* Border radius utilities */
.rounded {
    border-radius: var(--radius) !important;
}
.rounded-semi {
    border-radius: var(--radius-semi) !important;
}

/* Shadow utilities */
.shadow {
    box-shadow: var(--shadow) !important;
}

/* Flexbox utilities */
.flex {
    display: flex !important;
}
.flex-col {
    flex-direction: column !important;
}
.flex-row {
    flex-direction: row !important;
}
.items-center {
    align-items: center !important;
}
.justify-between {
    justify-content: space-between !important;
}

/* Spacing utilities */
.p-1 {
    padding: 0.25rem !important;
}
.p-2 {
    padding: 0.5rem !important;
}
.p-4 {
    padding: 1rem !important;
}
.m-1 {
    margin: 0.25rem !important;
}
.m-2 {
    margin: 0.5rem !important;
}
.m-4 {
    margin: 1rem !important;
}

/* ========================================
   FORM & INTERACTIVE ELEMENTS
======================================== */

/* Toggle Switch */
.toggle-switch-div {
    width: 2.25rem;
    height: 0.8rem;
    background: rgba(75, 85, 99, 0.5);
    border-radius: 9999px;
    transition: background-color 0.15s ease-in-out;
}

.peer:checked + .toggle-switch-div {
    background: rgb(34, 197, 94);
}

.peer:focus + .toggle-switch-div {
    outline: none;
    box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.5);
}

/* ========================================
   DRAG AND DROP
======================================== */
.drag-upload-dropzone {
    border: 2px dashed var(--color-accent);
    background: var(--color-card);
    border-radius: var(--radius);
    padding: 24px 12px;
    transition: border-color 0.2s, background 0.2s;
}

.drag-upload-dropzone.drag-over {
    border-color: var(--color-bar);
    background: var(--color-bg);
}

.sticky-box {
    position: sticky;
    top: 5rem;
    width: 100%;
}

/* ========================================
   MISCELLANEOUS / DYNAMIC ELEMENTS
======================================== */
#mouse-bubble {
    position: fixed;
    z-index: 9999;
    pointer-events: none;
    padding: 4px 8px;
    font-size: 12px;
    border-radius: 6px;
    background: rgba(30, 30, 30, 0.5);
    backdrop-filter: blur(8px);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    transform: translate(0px, 0px) scale(0.95);
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

/* ========================================
   RESPONSIVE DESIGN & MEDIA QUERIES
======================================== */

@media (min-width: 768px) {
    .bottom-nav {
        display: none !important;
    }
}

/* Hide scrollbar only on mobile screens */
@media (max-width: 768px) {
    .no-scrollbar::-webkit-scrollbar {
        display: none;
    }
    .no-scrollbar {
        -ms-overflow-style: none;
        scrollbar-width: none;
    }

    .panel {
        background: var(--color-card);
        border-radius: var(--radius);
        box-shadow: var(--shadow);
        padding: 0.2rem;
        margin-bottom: 1.5rem;
    }
}

@media (max-width: 700px) {
    #order-details-panel .order-details-modal {
        max-width: 98vw;
        padding: 1rem 0.5rem 1rem 0.5rem;
    }
}

@media (max-width: 640px) {
    .scroll-x {
        min-width: 320px;
        width: 100%;
        overflow-x: auto;
    }
}

/* Custom styles for the code block to ensure proper display */
pre[class*="language-"] {
    margin: 0;
    padding: 1em;
    overflow: auto;
    border-radius: 0.5rem; /* Rounded corners for the code block */
    background-color: #000000; /* Match card background */
    color: #000000; /* Ensure text is readable */
}
code[class*="language-"] {
    font-size: 0.875rem; /* text-sm equivalent */
}

Main-block,
info-block,
type-block,
header-block,
preview-block,
indicator-block,
container-block,
preview,
code-block {
    display: block;
}

/* Class to visually hide an input element while keeping it accessible and functional (triggered by a label) */
.visually-hidden-input {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border-width: 0 !important;
}

/* Custom style for the thumbnail checkmark (Re-added) */
.thumbnail-indicator {
    position: absolute;
    top: 4px;
    left: 4px;
    width: 16px;
    height: 16px;
    background-color: var(--color-accent);
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s;
}
.is-thumbnail .thumbnail-indicator {
    opacity: 1;
}

select[disabled] {
    opacity: 0.6;
    cursor: not-allowed;
}
