/* MotoPecas - Custom Styles */

/* HTMX indicators */
.htmx-indicator {
    display: none;
}

.htmx-request .htmx-indicator {
    display: inline-block;
}

.htmx-request.htmx-indicator {
    display: inline-block;
}

/* Loading spinner */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
}

/* Cards */
.card {
    border-radius: 0.5rem;
}

.card-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
}

/* Tables */
.table th {
    font-weight: 600;
    background-color: #f8f9fa;
}

/* Forms */
.form-control:focus,
.form-select:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* Buttons */
.btn {
    border-radius: 0.375rem;
}

/* Navbar */
.navbar-brand {
    font-weight: 600;
}

/* Alerts */
.alert {
    border-radius: 0.375rem;
}

/* Badge for stock */
.badge-stock-low {
    background-color: #dc3545;
}

.badge-stock-ok {
    background-color: #198754;
}

/* Print styles for thermal receipt 80mm */
@media print {
    @page {
        size: 80mm auto;
        margin: 0;
    }

    body {
        width: 72mm;
        font-family: 'Courier New', Courier, monospace;
        font-size: 12px;
        margin: 0;
        padding: 4mm;
    }

    .no-print {
        display: none !important;
    }

    .print-only {
        display: block !important;
    }
}

.print-only {
    display: none;
}

/* Search input with barcode icon */
.input-barcode {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%236c757d' class='bi bi-upc-scan' viewBox='0 0 16 16'%3E%3Cpath d='M1.5 1a.5.5 0 0 0-.5.5v3a.5.5 0 0 1-1 0v-3A1.5 1.5 0 0 1 1.5 0h3a.5.5 0 0 1 0 1zM11 .5a.5.5 0 0 1 .5-.5h3A1.5 1.5 0 0 1 16 1.5v3a.5.5 0 0 1-1 0v-3a.5.5 0 0 0-.5-.5h-3a.5.5 0 0 1-.5-.5M.5 11a.5.5 0 0 1 .5.5v3a.5.5 0 0 0 .5.5h3a.5.5 0 0 1 0 1h-3A1.5 1.5 0 0 1 0 14.5v-3a.5.5 0 0 1 .5-.5m15 0a.5.5 0 0 1 .5.5v3a1.5 1.5 0 0 1-1.5 1.5h-3a.5.5 0 0 1 0-1h3a.5.5 0 0 0 .5-.5v-3a.5.5 0 0 1 .5-.5M3 4.5a.5.5 0 0 1 1 0v7a.5.5 0 0 1-1 0zm2 0a.5.5 0 0 1 1 0v7a.5.5 0 0 1-1 0zm2 0a.5.5 0 0 1 1 0v7a.5.5 0 0 1-1 0zm2 0a.5.5 0 0 1 .5-.5h1a.5.5 0 0 1 .5.5v7a.5.5 0 0 1-.5.5h-1a.5.5 0 0 1-.5-.5zm3 0a.5.5 0 0 1 1 0v7a.5.5 0 0 1-1 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: 10px center;
    padding-left: 35px;
}

/* Quantity input */
.input-quantity {
    max-width: 80px;
    text-align: center;
}

/* Price display */
.price {
    font-weight: 600;
    color: #198754;
}

.price-total {
    font-size: 1.25rem;
    font-weight: 700;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 2.5rem 1rem;
    color: #6c757d;
}

.empty-state > i.bi {
    display: block;
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
    opacity: 0.4;
}

.empty-state p {
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.empty-state .btn i.bi {
    display: inline;
    font-size: inherit;
    opacity: 1;
}
