html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}




/* Responsive fixes for Bootstrap */
@@media (max-width: 768px) {
    .table-responsive

{
    font-size: 0.85rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.card-header {
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
}

.form-label {
    font-size: 0.85rem;
    margin-bottom: 0.2rem;
    font-weight: 600;
}

.input-group-sm .form-control,
.input-group-sm .btn {
    height: calc(1.5em + 0.5rem + 2px);
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}
/* Better touch targets for mobile */
.btn, .form-control, .form-select {
    min-height: 44px;
}
/* Product cards spacing */
.product-card .card-body {
    padding: 0.75rem;
}

.product-card .row.g-1 > [class*="col-"] {
    margin-bottom: 0.5rem;
}
/* Make barcode input larger for easier scanning */
#globalBarcodeSearch {
    font-size: 16px !important;
}

}

@@media (max-width: 576px) {
    .container-fluid {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }

    .card-body {
        padding: 0.75rem;
    }

    .btn-lg {
        padding: 0.75rem 1rem;
        font-size: 1rem;
    }

    .product-card .row .col-6,
    .product-card .row .col-12,
    .product-card .row .col-4 {
        padding-left: 0.25rem;
        padding-right: 0.25rem;
    }
}

/* Prevent zoom on iOS for inputs */
@@media(max-width: 768px) {
    input[type="text"],
    input[type="number"],
    input[type="date"],
    select.form-control {
        font-size: 16px !important;
    }
}

/* Better spacing for form controls */
.form-control-sm, .form-select-sm {
    padding: 0.375rem 0.5rem;
    font-size: 0.875rem;
    height: calc(1.5em + 0.75rem + 2px);
    line-height: 1.5;
}

/* Desktop table improvements */
@@media(min-width: 768px) {
    #saleItemsTable th {
        white-space: nowrap;
        position: sticky;
        top: 0;
        /*background-color: #212529;*/
        background-color: floralwhite;
        z-index: 10;
    }

    #saleItemsTable td {
        vertical-align: middle;
    }
}

/* Card design for mobile */
.product-card {
    border-radius: 0.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border: 1px solid #dee2e6;
    margin-bottom: 0.75rem;
}

    .product-card .card-header {
        border-radius: 0.5rem 0.5rem 0 0 !important;
        background-color: #f8f9fa;
        border-bottom: 1px solid #dee2e6;
        padding: 0.5rem 0.75rem;
    }

/* Improve badge visibility */
.badge {
    font-size: 0.85em;
    padding: 0.35em 0.65em;
    font-weight: 600;
}

/* Financial summary improvements */
#financialSummary, #financialSummaryMobile {
    background-color: #f8f9fa !important;
}

    #financialSummary .badge,
    #financialSummaryMobile .badge {
        font-size: 0.9em;
        padding: 0.4em 0.8em;
        min-width: 60px;
        display: inline-block;
        text-align: center;
    }

/* Highlight effect */
.highlight-row, .highlight-card {
    animation: highlight 1.5s ease-out;
}

.product-card.highlight-card {
    border: 2px solid #198754;
    box-shadow: 0 0 0 0.25rem rgba(25, 135, 84, 0.25);
}

@@keyframes highlight {
    0% {
        background-color: rgba(25, 135, 84, 0.2);
    }

    50% {
        background-color: rgba(25, 135, 84, 0.4);
    }

    100% {
        background-color: transparent;
    }
}

/* Improve number input alignment */
input[type="number"].text-end {
    text-align: right;
    direction: ltr;
}

