/* VT Canna Marketplace -- Dark theme styles */

@font-face {
    font-family: 'Roboto Local';
    src: url('../fonts/Roboto-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Roboto Local';
    src: url('../fonts/Roboto-Medium.ttf') format('truetype');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Roboto Local';
    src: url('../fonts/Roboto-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Ubuntu Local';
    src: url('../fonts/Ubuntu-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Ubuntu Local';
    src: url('../fonts/Ubuntu-Medium.ttf') format('truetype');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Ubuntu Local';
    src: url('../fonts/Ubuntu-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Archivo Black Local';
    src: url('../fonts/ArchivoBlack-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

html.font-theme-roboto body {
    font-family: 'Roboto Local', sans-serif;
}

html.font-theme-roboto h1,
html.font-theme-roboto h2,
html.font-theme-roboto h3,
html.font-theme-roboto h4,
html.font-theme-roboto h5,
html.font-theme-roboto h6,
html.font-theme-roboto .navbar-brand {
    font-family: 'Roboto Local', sans-serif;
}

html.font-theme-ubuntu body {
    font-family: 'Ubuntu Local', sans-serif;
}

html.font-theme-ubuntu h1,
html.font-theme-ubuntu h2,
html.font-theme-ubuntu h3,
html.font-theme-ubuntu h4,
html.font-theme-ubuntu h5,
html.font-theme-ubuntu h6,
html.font-theme-ubuntu .navbar-brand {
    font-family: 'Ubuntu Local', sans-serif;
}

html.font-theme-archivo body {
    font-family: 'Ubuntu Local', sans-serif;
}

html.font-theme-archivo h1,
html.font-theme-archivo h2,
html.font-theme-archivo h3,
html.font-theme-archivo h4,
html.font-theme-archivo h5,
html.font-theme-archivo h6,
html.font-theme-archivo .navbar-brand {
    font-family: 'Archivo Black Local', sans-serif;
    letter-spacing: 0.02em;
}

body {
    background-color: #121212;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1 0 auto;
}

/* Top navbar */
.topbar {
    background-color: #0a0a0a !important;
    height: 56px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 2000 !important;
}

.navbar {
    background-color: #0a0a0a !important;
}

.navbar-brand {
    font-size: 1.3rem;
}

/* Keep topbar account dropdown from reflowing navbar layout */
.topbar .dropdown {
    position: relative;
}

.topbar .navbar-nav .dropdown-menu {
    position: absolute;
    right: 0;
    left: auto;
    top: 100%;
    z-index: 2100;
}

/* Sidebar navigation */
.sidebar-nav {
    background-color: #0a0a0a;
    border-right: 1px solid #2e7d32;
    width: 240px !important;
    top: 56px !important;
    height: calc(100vh - 56px) !important;
    z-index: 1030 !important;
}

.sidebar-section-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #6c757d;
    padding: 1rem 1rem 0.25rem;
}

.sidebar-links .nav-link {
    color: #bbb;
    padding: 0.5rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    border-left: 3px solid transparent;
    transition: background-color 0.15s, color 0.15s, border-color 0.15s;
}

.sidebar-links .nav-link:hover {
    background-color: #1a1a1a;
    color: #fff;
    border-left-color: #2e7d32;
}

.sidebar-links .nav-link .bi {
    font-size: 1.1rem;
    width: 1.25rem;
    text-align: center;
}

/* Main content offset for sidebar on desktop */
@media (min-width: 992px) {
    .main-content {
        margin-left: 240px;
    }

    .sidebar-nav {
        position: fixed !important;
        left: 0;
        top: 56px !important;
        bottom: 0;
        overflow-y: auto;
    }
}

/* Topbar offset (main content only, not footer) */
main.main-content {
    padding-top: 56px;
}

/* Sidebar offcanvas header only on mobile */
@media (min-width: 992px) {
    .sidebar-nav .offcanvas-header {
        display: none;
    }
}

/* Cards */
.card {
    transition: border-color 0.2s;
}

.product-card:hover {
    border-color: #2e7d32 !important;
}

/* Vendor cards */
.vendor-card {
    transition: border-color 0.2s, transform 0.2s;
}

.vendor-card:hover {
    border-color: #198754 !important;
    transform: translateY(-4px);
}

/* Product card images */
.product-card-img-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #1a1a1a;
    border-bottom: 1px solid var(--bs-border-color);
}

.product-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-card-img-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: #333;
}

.product-card-badges {
    position: absolute;
    bottom: 8px;
    left: 8px;
    display: flex;
    gap: 4px;
}

/* Strain type badges */
.strain-badge {
    font-weight: 600;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.strain-indica {
    background-color: #9c27b0 !important;
}

.strain-sativa {
    background-color: #f9a825 !important;
    color: #000 !important;
}

.strain-hybrid {
    background-color: #2e7d32 !important;
}

.strain-cbd {
    background-color: #1565c0 !important;
}

/* Quantity input in cards */
.qty-input {
    text-align: center;
    -moz-appearance: textfield;
}

.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Tables */
.table-dark {
    --bs-table-bg: transparent;
}

/* Status badges */
.badge {
    font-weight: 500;
}

/* Price display */
.display-6 {
    font-weight: 700;
}

/* Sticky sidebar */
.sticky-top {
    z-index: 1;
}

/* Footer */
footer {
    background-color: #0a0a0a;
}

footer.main-content {
    margin-top: auto;
    flex-shrink: 0;
}

/* Flash messages */
.alert {
    border-radius: 0.5rem;
}

/* Form inputs on dark */
.form-control:focus,
.form-select:focus {
    border-color: #2e7d32;
    box-shadow: 0 0 0 0.2rem rgba(46, 125, 50, 0.25);
}

/* Native date/time pickers -- dark theme support */
input[type="date"],
input[type="time"] {
    color-scheme: dark;
}

/* Cart badge */
#cart-badge {
    font-size: 0.65rem;
    position: relative;
    top: -8px;
}

/* Product detail pricing card */
.card-header.bg-success {
    background-color: #2e7d32 !important;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Report summary cards */
.card.border-success .display-6,
.card.border-warning .display-6 {
    font-size: 2rem;
}

/* Sidebar filter accordion -- dark theme */
.sidebar-accordion .accordion-item {
    background-color: transparent;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-accordion .accordion-button {
    background-color: #1a1a1a;
    color: #e0e0e0;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 0.75rem 1rem;
    box-shadow: none;
}

.sidebar-accordion .accordion-button:not(.collapsed) {
    background-color: #1e3a1e;
    color: #4caf50;
}

.sidebar-accordion .accordion-button::after {
    filter: invert(1);
}

.sidebar-accordion .accordion-button:focus {
    box-shadow: 0 0 0 0.2rem rgba(46, 125, 50, 0.25);
    border-color: #2e7d32;
}

.sidebar-filter-body {
    padding: 0.5rem 1rem;
}

.sidebar-form-check {
    padding-top: 0.25rem;
    padding-bottom: 0.25rem;
}

.sidebar-form-check .form-check-label {
    font-size: 0.85rem;
    cursor: pointer;
}

.sidebar-filters .card-footer {
    background: transparent;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* FullCalendar -- Dark theme overrides */
.fc {
    --fc-border-color: #333;
    --fc-button-bg-color: #2e7d32;
    --fc-button-border-color: #2e7d32;
    --fc-button-hover-bg-color: #1b5e20;
    --fc-button-hover-border-color: #1b5e20;
    --fc-button-active-bg-color: #1b5e20;
    --fc-button-active-border-color: #1b5e20;
    --fc-today-bg-color: rgba(46, 125, 50, 0.1);
    --fc-neutral-bg-color: #1a1a1a;
    --fc-page-bg-color: #121212;
    --fc-list-event-hover-bg-color: #1a1a1a;
}

.fc .fc-col-header-cell {
    background-color: #1a1a1a;
}

.fc .fc-col-header-cell-cushion {
    color: #aaa;
    text-decoration: none;
}

.fc .fc-daygrid-day-number {
    color: #ccc;
    text-decoration: none;
}

.fc .fc-day-other .fc-daygrid-day-number {
    color: #555;
}

.fc .fc-toolbar-title {
    color: #e0e0e0;
    font-size: 1.25rem;
}

.fc .fc-button {
    font-size: 0.85rem;
}

.fc .fc-daygrid-event,
.fc .fc-timegrid-event {
    border-radius: 4px;
    font-size: 0.75rem;
    cursor: pointer;
    padding: 1px 3px;
}

.fc .fc-timegrid-slot {
    border-color: #333;
}

.fc .fc-timegrid-slot-label-cushion {
    color: #888;
}

.fc .fc-scrollgrid {
    border-color: #333;
}

/* FullCalendar nav button icons -- force visible arrows */
.fc .fc-button .fc-icon {
    color: #fff;
    font-size: 1.1em;
}

.fc .fc-button:hover .fc-icon {
    color: #fff;
}

.fc .fc-prev-button,
.fc .fc-next-button {
    min-width: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.fc .fc-today-button {
    font-size: 0.85rem;
}

.fc .fc-timegrid-now-indicator-line {
    border-color: #2e7d32;
}

/* Color swatches for custom calendar events */
.color-swatch {
    display: inline-block;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    border: 3px solid transparent;
    transition: border-color 0.15s, transform 0.15s;
}

.color-swatch:hover {
    transform: scale(1.15);
}

.color-swatch.active {
    border-color: #fff;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.3);
}

/* Chat message bubbles */
.msg-bubble {
    max-width: 70%;
    padding: 0.5rem 0.75rem;
    border-radius: 1rem;
    margin-bottom: 0.5rem;
    word-wrap: break-word;
}

.msg-sent {
    background-color: #2e7d32;
    color: #fff;
    margin-left: auto;
    border-bottom-right-radius: 0.25rem;
}

.msg-received {
    background-color: #2a2a2a;
    color: #e0e0e0;
    margin-right: auto;
    border-bottom-left-radius: 0.25rem;
}

.msg-time {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 0.2rem;
}
