@import url('https://fonts.googleapis.com/css2?family=Tilt+Neon&family=Fira+Code:wght@300..700&display=swap');

html, body {
    font-family: 'Tilt Neon', cursive, Helvetica, Arial, sans-serif;
}

body {
    margin: 0;
    background-color: #eee;
    overflow: hidden;
}

a:hover, .btn-link:hover {
    text-decoration: none !important;
}

.content {
    padding-top: 1.1rem;
}

.dropdown-item {
    cursor: pointer;
}

    .dropdown-item:active {
        background-color: #6c757d;
        color: #fff;
    }

.dropdown-menu > li > a:hover {
    background-image: none;
    background-color: #6c757d;
    color: #fff;
}

button[data-bs-toggle="dropdown"],
button[data-bs-toggle="dropdown"]:hover,
button[data-bs-toggle="dropdown"]:active,
button[data-bs-toggle="dropdown"]:focus {
    border: 1px solid #dee2e6 !important;
    box-shadow: none !important;
}

/* Offset modals clear of the 250px docked sidebar so they centre in the content area (matches Backend). */
.modal {
    margin-left: 125px !important;
    margin-top: 30px !important;
}

.sidebar-floating .modal {
    margin-left: 0 !important;
}

.sidebar-floating article {
    min-width: 100vw;
}

.bs-popover-dark .popover-body {
    background: #222;
    color: #fff;
    border-radius: 6px;
    padding-top: 4px;
}

.bs-popover-dark .popover-body img {
    height: 500px;
}

.bs-popover-dark .popover-arrow::before,
.bs-popover-dark .popover-arrow::after {
    border-bottom-color: #222 !important;
}

/* Shop-specific form/page styles (login + page bodies) */
.field { margin-bottom: 1rem; }
.field label { display: block; font-weight: 600; margin-bottom: 0.25rem; }
.field input, .field select, .field textarea { padding: 0.4rem 0.6rem; border: 1px solid #d1d5db; border-radius: 4px; min-width: 280px; }
.api-key-box { font-family: monospace; background: #f3f4f6; padding: 0.5rem; border-radius: 4px; word-break: break-all; }

/* Match the Backend account cards' rounded corners (Backend app.css uses 15px). */
.card {
    border-radius: 15px;
}

/* Match the Backend's toggle (form-switch) styling: red ✗ when off, green ✓ when on. */
.form-check-input:checked {
    background-color: #6c757d;
    border-color: #6c757d;
}

.form-check-input:focus {
    border-color: #6c757d;
    box-shadow: 0 0 0 0.25rem rgba(108, 117, 125, 0.25);
}

.form-switch .form-check-input {
    --bs-form-switch-bg: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23fff'/%3e%3c/svg%3e") !important;
    height: 20px !important;
    width: 40px !important;
}

    .form-switch .form-check-input:focus {
        border-color: rgba(0, 0, 0, 0.25);
        box-shadow: 0 0 0 0 rgba(0, 0, 0, 0);
        outline: 0;
    }

    .form-switch .form-check-input:not(checked) {
        background-color: #dc3545;
        border: none;
        border-color: #DC3545;
    }

    .form-switch .form-check-input:checked {
        background-color: #198753;
        border: none;
        border-color: #198754;
    }

    .form-switch .form-check-input:not(checked)::after {
        color: #fff !important;
        content: "\f00d" !important;
        font: var(--fa-font-solid) !important;
        font-size: 9pt !important;
        left: 25px !important;
        position: relative;
        top: -3px;
    }

    .form-switch .form-check-input:checked::after {
        color: #fff !important;
        content: "\f00c" !important;
        font: var(--fa-font-solid) !important;
        font-size: 9pt !important;
        left: 7px !important;
        position: relative;
        top: -3px;
    }

/* Backend list-table look (copied from Backend app.css). */
table.datatable {
    width: 100%;
}

    table.datatable td {
        padding: 5px;
        text-align: center;
        vertical-align: middle;
    }

        table.datatable td:first-child {
            padding-left: 10px !important;
        }

        table.datatable td:last-child {
            padding-right: 10px !important;
        }

    table.datatable th {
        background-color: #6c757d;
        color: #fff;
        cursor: pointer;
        padding: 10px 5px 10px 5px;
        text-align: center;
        white-space: nowrap;
    }

        table.datatable th:first-child {
            border-top-left-radius: 10px;
            padding-left: 10px !important;
        }

        table.datatable th:last-child {
            border-top-right-radius: 10px;
            padding-right: 10px !important;
        }

    table.datatable tr:nth-child(even) {
        background-color: #f2f2f2;
    }

/* Buttons + validation, matching Backend app.css. */
.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

/* White dropdown/select-style button (Bootstrap has no btn-white). */
.btn-white {
    background-color: #fff;
    border-color: #ced4da;
    color: #212529;
}

    .btn-white:hover,
    .btn-white:focus {
        background-color: #f8f9fa;
        border-color: #ced4da;
        color: #212529;
    }

/* Remove the blue focus halo on inputs/buttons (matches Backend). */
.form-control:focus {
    border-color: #dee2e6;
    box-shadow: none;
    outline: none;
}

button,
.btn:focus,
.btn:active {
    box-shadow: none !important;
    outline: none !important;
}

button[data-bs-toggle="dropdown"]:focus {
    border: 1px solid #dee2e6 !important;
    box-shadow: none !important;
}

/* Hide number-input spinner arrows so right-aligned values sit flush. */
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type=number] {
    -moz-appearance: textfield;
    appearance: textfield;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

/* Modal header/footer bars + sizing, matching Backend app.css. */
.modal-header {
    background-color: #f8f8f8 !important;
    height: 50px;
    padding: 2px 0px 0px 8px;
}

.modal-footer {
    background-color: #f8f8f8 !important;
    height: 50px;
    padding: 0px 8px 0px 8px;
}

.modal-content {
    max-height: 80vh !important;
}

.modal-body {
    overflow-y: auto !important;
}

/* Custom breakpoints beyond Bootstrap's xxl (1400px), matching Backend — enables 4-across cards. */
@media (min-width: 2200px) {
    .col-xxxl-1 { flex: 0 0 8.333333%; max-width: 8.333333%; }
    .col-xxxl-2 { flex: 0 0 16.666667%; max-width: 16.666667%; }
    .col-xxxl-3 { flex: 0 0 25%; max-width: 25%; }
    .col-xxxl-4 { flex: 0 0 33.333333%; max-width: 33.333333%; }
    .col-xxxl-6 { flex: 0 0 50%; max-width: 50%; }
}

@media (min-width: 3000px) {
    .col-xxxxl-1 { flex: 0 0 8.333333%; max-width: 8.333333%; }
    .col-xxxxl-2 { flex: 0 0 16.666667%; max-width: 16.666667%; }
    .col-xxxxl-3 { flex: 0 0 25%; max-width: 25%; }
    .col-xxxxl-4 { flex: 0 0 33.333333%; max-width: 33.333333%; }
    .col-xxxxl-6 { flex: 0 0 50%; max-width: 50%; }
}

/* Product-card variant stock strip */
.variant-strip-wrap {
    min-width: 0;
}

.variant-strip {
    display: flex;
    flex: 1 1 auto;
    gap: 0.25rem;
    min-width: 0;
    overflow-x: auto;
    scrollbar-width: none;        /* Firefox */
    -ms-overflow-style: none;     /* old Edge */
}

.variant-strip::-webkit-scrollbar {
    display: none;
}

.variant-chip {
    align-items: stretch;
    display: inline-flex;
    flex: 0 0 auto;
    font-size: 0.8125rem;
    white-space: nowrap;
}

.variant-chip-name {
    align-items: center;
    background: #f1f3f5;
    border-radius: 0.375rem 0 0 0.375rem;
    display: inline-flex;
    padding: 0.1rem 0.45rem;
}

.variant-chip-stock {
    align-items: center;
    border-radius: 0 0.375rem 0.375rem 0;
    display: inline-flex;
    font-weight: 600;
    padding: 0.1rem 0.45rem;
}

.variant-more {
    flex: 0 0 auto;
}

/* Datatable: shrink fixed-content columns to their content */
.datatable .col-min {
    white-space: nowrap;
    width: 1%;
}

/* Vertical event timeline (order / return detail modals) */
.wv-timeline {
    list-style: none;
    margin: 0;
    padding: 0;
}

.wv-timeline > li {
    padding: 0 0 14px 22px;
    position: relative;
}

.wv-timeline > li:last-child {
    padding-bottom: 0;
}

.wv-timeline > li::before {
    background: var(--bs-border-color);
    bottom: -2px;
    content: "";
    left: 6px;
    position: absolute;
    top: 16px;
    width: 2px;
}

.wv-timeline > li:last-child::before {
    display: none;
}

.wv-dot {
    border-radius: 50%;
    box-shadow: 0 0 0 2px #fff;
    height: 12px;
    left: 1px;
    position: absolute;
    top: 7px;
    width: 12px;
}

/* Right-aligned timeline variant: dots + line on the right, content to their left */
.wv-timeline.wv-right > li {
    padding: 0 22px 14px 0;
    text-align: right;
}

.wv-timeline.wv-right > li::before {
    left: auto;
    right: 6px;
}

.wv-timeline.wv-right .wv-dot {
    left: auto;
    right: 1px;
}

/* Horizontal timeline variant (order / return detail modals) */
.wv-htl {
    overflow-x: auto;
    padding: 4px 0 2px;
}

.wv-htl-inner {
    display: flex;
}

.wv-htl-step {
    flex: 0 0 96px;
    padding: 0 4px;
    position: relative;
    text-align: center;
}

.wv-htl-step::before {
    background: var(--bs-border-color);
    content: "";
    height: 2px;
    left: 50%;
    position: absolute;
    top: 9px;
    width: 96px;
    z-index: 0;
}

.wv-htl-step:last-child::before {
    display: none;
}

.wv-htl-dot {
    border-radius: 50%;
    box-shadow: 0 0 0 2px #fff;
    display: block;
    height: 12px;
    margin: 3px auto 5px;
    position: relative;
    width: 12px;
    z-index: 1;
}

.wv-htl-label {
    font-size: 0.76rem;
    line-height: 1.15;
}

.wv-htl-time {
    color: var(--bs-secondary);
    font-size: 0.68rem;
}

/* Horizontal timeline: drag-to-pan affordance + hidden scrollbar */
.wv-htl {
    user-select: none;
    scrollbar-width: none;        /* Firefox */
    -ms-overflow-style: none;     /* old Edge */
}

.wv-htl::-webkit-scrollbar {
    display: none;                /* Chrome / Safari */
}

.wv-htl.wv-grab {
    cursor: grab;
}

.wv-htl.wv-grabbing {
    cursor: grabbing;
}
