/* Font Size Override - Reduce all fonts by 25% */

/* Base font size reduction */
html {
    font-size: 13.6px !important; /* Default is 16px, reduced by 15% (10% larger than previous 25% reduction) */
}

body {
    font-size: 0.85rem !important; /* Equivalent to ~13.6px */
    line-height: 1.4 !important;
}

/* Bootstrap component overrides */
.h1, h1 { font-size: 2.125rem !important; } /* ~34px instead of 40px */
.h2, h2 { font-size: 1.7rem !important; }   /* ~27px instead of 32px */
.h3, h3 { font-size: 1.275rem !important; } /* ~20px instead of 24px */
.h4, h4 { font-size: 1.13rem !important; }  /* ~18px instead of 20px */
.h5, h5 { font-size: 0.99rem !important; }  /* ~16px instead of 18px */
.h6, h6 { font-size: 0.85rem !important; }  /* ~14px instead of 16px */

/* Navigation and buttons */
.navbar-brand { font-size: 1.275rem !important; }
.nav-link { font-size: 0.85rem !important; }
.btn { 
    font-size: 0.85rem !important; 
    padding: 0.35rem 0.7rem !important;
}
.btn-sm { 
    font-size: 0.75rem !important; 
    padding: 0.25rem 0.45rem !important;
}
.btn-lg { 
    font-size: 0.99rem !important; 
    padding: 0.45rem 0.9rem !important;
}

/* Forms */
.form-control, .form-select {
    font-size: 0.85rem !important;
    padding: 0.35rem 0.7rem !important;
}
.form-label {
    font-size: 0.85rem !important;
    font-weight: 600 !important;
}
.input-group-text {
    font-size: 0.85rem !important;
    padding: 0.35rem 0.7rem !important;
}

/* Tables */
.table {
    font-size: 0.8rem !important;
}
.table th, .table td {
    padding: 0.45rem !important;
    vertical-align: middle !important;
}
.table-sm th, .table-sm td {
    padding: 0.25rem !important;
}

/* Cards */
.card-title {
    font-size: 1.13rem !important;
    margin-bottom: 0.5rem !important;
}
.card-text, .card-body {
    font-size: 0.85rem !important;
}
.card-header {
    font-size: 0.9rem !important;
    padding: 0.45rem 0.9rem !important;
}

/* Alerts and badges */
.alert {
    font-size: 0.85rem !important;
    padding: 0.55rem 0.9rem !important;
}
.badge {
    font-size: 0.7rem !important;
    padding: 0.25rem 0.45rem !important;
}

/* Lists */
.list-group-item {
    font-size: 0.85rem !important;
    padding: 0.45rem 0.9rem !important;
}

/* Modals */
.modal-title {
    font-size: 1.13rem !important;
}
.modal-body, .modal-footer {
    font-size: 0.85rem !important;
}

/* Dropdown menus */
.dropdown-item {
    font-size: 0.85rem !important;
    padding: 0.25rem 1rem !important;
}

/* Pagination */
.page-link {
    font-size: 0.8rem !important;
    padding: 0.35rem 0.6rem !important;
}

/* Breadcrumbs */
.breadcrumb-item {
    font-size: 0.8rem !important;
}

/* Custom classes for specific elements */
.small-text {
    font-size: 0.75rem !important;
}

.display-text {
    font-size: 0.9rem !important;
}

/* Specific overrides for sales interface */
.cart-item {
    font-size: 0.8rem !important;
}

.sales-summary {
    font-size: 0.85rem !important;
}

/* Dashboard cards */
.dashboard-card .card-body {
    padding: 0.8rem !important;
}

.dashboard-card .card-title {
    font-size: 0.9rem !important;
}

/* Auto-order tables */
.auto-order-table {
    font-size: 0.75rem !important;
}

.auto-order-table th,
.auto-order-table td {
    padding: 0.35rem 0.45rem !important;
}

/* Ensure minimum readability */
@media (max-width: 768px) {
    body {
        font-size: 0.9rem !important;
    }
    
    .table {
        font-size: 0.85rem !important;
    }
}

/* Text utilities with reduced sizes */
.text-xs { font-size: 0.7rem !important; }
.text-sm { font-size: 0.8rem !important; }
.text-base { font-size: 0.85rem !important; }
.text-lg { font-size: 1rem !important; }
.text-xl { font-size: 1.25rem !important; }

/* Input and select minimum sizes for usability */
.form-control:focus,
.form-select:focus {
    box-shadow: 0 0 0 0.15rem rgba(13, 110, 253, 0.25) !important;
}

/* Ensure buttons remain clickable */
.btn {
    min-height: 32px !important;
    line-height: 1.2 !important;
}

/* Responsive adjustments */
@media (min-width: 1200px) {
    .container-xl {
        font-size: 0.85rem !important;
    }
}

/* Make sure text doesn't become too small to read */
* {
    min-font-size: 10px;
}

/* Enhanced visibility improvements */
.table-striped > tbody > tr:nth-of-type(odd) > td,
.table-striped > tbody > tr:nth-of-type(odd) > th {
    background-color: rgba(0, 0, 0, 0.025) !important;
}

/* Ensure button text is always visible */
.btn-primary {
    color: #fff !important;
    background-color: #0d6efd !important;
    border-color: #0d6efd !important;
}

.btn-secondary {
    color: #fff !important;
    background-color: #6c757d !important;
    border-color: #6c757d !important;
}

.btn-success {
    color: #fff !important;
    background-color: #198754 !important;
    border-color: #198754 !important;
}

.btn-danger {
    color: #fff !important;
    background-color: #dc3545 !important;
    border-color: #dc3545 !important;
}

.btn-warning {
    color: #000 !important;
    background-color: #ffc107 !important;
    border-color: #ffc107 !important;
}

.btn-info {
    color: #000 !important;
    background-color: #0dcaf0 !important;
    border-color: #0dcaf0 !important;
}

/* Improve form field visibility */
.form-control {
    border: 1px solid #ced4da !important;
    background-color: #fff !important;
}

.form-control:disabled {
    background-color: #e9ecef !important;
    opacity: 1 !important;
}

/* Better dropdown visibility */
.dropdown-menu {
    border: 1px solid rgba(0, 0, 0, 0.15) !important;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.175) !important;
}

/* Enhanced table row hover */
.table-hover > tbody > tr:hover {
    background-color: rgba(0, 0, 0, 0.075) !important;
}

/* Clear navigation active states */
.nav-pills .nav-link.active {
    background-color: #0d6efd !important;
    color: #fff !important;
}

/* Ensure sidebar text is visible */
.sidebar {
    color: #212529 !important;
}

.sidebar .nav-link {
    color: #495057 !important;
}

.sidebar .nav-link:hover {
    color: #0d6efd !important;
    background-color: rgba(13, 110, 253, 0.1) !important;
}