/* Base styles */
body {
    font-family: 'Arial', sans-serif;
    padding: 20px;
    background-color: #001D3D;
    color: #f8f9fa;
}

h1, h2, h3, h4, h5, h6 {
    color: #f8f9fa;
}

table {
    border-collapse: collapse;
    color: #f8f9fa;
}

.table {
    color: #f8f9fa !important;
}

.table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(255, 255, 255, 0.05) !important;
}

th, td {
    text-align: left;
    padding: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}


/* Increase the size of clickable elements for touch screens */
button, .btn {
    padding: 15px 25px;
    font-size: 18px; /* Larger font size for better readability on tablets */
    margin: 4px;
    display: inline-block;
    text-decoration: none;
    border: none;
    border-radius: 8px;
    min-height: 44px; /* Minimum touch target size */
    transition: all 0.2s ease;
}

/* Base button primary color - override Bootstrap's defaults to use our accent */
.btn-primary, .btn-success, .btn-info {
    background-color: #FFD700 !important;
    color: #001D3D !important;
    border: none !important;
    font-weight: bold;
}

.btn-primary:hover, .btn-success:hover, .btn-info:hover {
    background-color: #e6c200 !important;
    color: #001D3D !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.btn-secondary, .btn-dark {
    background-color: #003566 !important;
    color: #f8f9fa !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
}

.btn-secondary:hover, .btn-dark:hover {
    background-color: #004b8d !important;
    color: #fff !important;
}

/* Responsive design for tablets */
@media (min-width: 768px) and (max-width: 1024px) {
    body {
        padding: 30px;
    }

    /* Adjust table font size and padding for better readability on tablets */
    th, td {
        font-size: 20px;
        padding: 15px;
    }
}

/* Improve form inputs for touch interaction */
input[type="submit"], input[type="text"], select, input[type="password"], input[type="datetime-local"], input[type="number"] {
    font-size: 20px;
    padding: 15px;
    margin: 8px 0;
    display: inline-block;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    box-sizing: border-box;
    min-height: 50px;
    background-color: #003566;
    color: #f8f9fa;
}

.form-control {
    background-color: #003566 !important;
    color: #f8f9fa !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
}

.form-control::placeholder {
    color: rgba(255, 255, 255, 0.5) !important;
}

/* Layout adjustments for specific tablet orientations or further refinements can be added here */
.tables-container {
    display: flex;
    flex-wrap: nowrap; /* Change flex-wrap to nowrap to force them side-by-side */
    gap: 20px;
    margin-bottom: 20px;
}

#add-products-table, #current-bill-table {
    padding: 15px;
    background: #003566;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

#add-products-table {
    flex: 1 1 55%;
}

#current-bill-table {
    flex: 1 1 40%;
}

@media (max-width: 768px) {
    .tables-container {
        flex-wrap: wrap; /* Re-enable wrapping on smaller screens if needed */
    }
}

.text-area {
    padding: 5px;
    width: calc(100vw - 30px);
    height: calc(100vh - 295px);
}

.logged-in-info {
    position: absolute;
    right: 10px;
    top: 10px;
}

.content {
    flex: 1;
    display: flex;
    flex-direction: column;  /* Ensures content inside it can also be flexed if needed */
}

.footer {
    background-color: #003566; /* Match nav */
    color: #f8f9fa;
    text-align: right;
    padding: 20px 0;
    margin-top: auto;
    position: fixed;
    bottom: 0;
    right: 10px;
    border-top-left-radius: 8px;
    box-shadow: -2px -2px 8px rgba(0,0,0,0.2);
    padding-left: 20px;
}

@media (max-width: 768px) {
    .footer {
        padding: 10px 0;
    }

}

.btn-link {
    display: block; /* Makes the link fill the cell for easier clicking */
    padding: 10px; /* Adds some space around the text for aesthetics */
    color: blue; /* Style as needed */
}

.product-button-add {
    width: 80px;
    height: 50px;
    background: green;
}

.product-button-remove {
    width: 80px;
    height: 50px;
    background: red;
}

.table-full-page {
    width: 100%;
}

.table-total-cell {
    text-align: right;
}

.btn-add-items {
    height: 50px;
    width: 90px;
    background-color: #FFD700;
    color: #001D3D;
    font-size: 20px;
    font-weight: bold;
    border-radius: 8px;
}

.btn-add-items:hover {
    background-color: #e6c200;
}

.btn-remove-items {
    height: 50px;
    width: 90px;
    background-color: #8B0000;
    color: #f8f9fa;
    font-size: 20px;
    font-weight: bold;
    border-radius: 8px;
}

.padding-bottom {
    padding-bottom: 60px;
}

.container {
    width: 100%;
}

.accordion-toggle {
    background-color: #003566;
    color: #f8f9fa;
    cursor: pointer;
    padding: 15px;
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    text-align: left;
    outline: none;
    font-size: 20px;
    font-weight: bold;
    transition: background-color 0.4s ease;
    margin-bottom: 5px;
}

.accordion-toggle:hover {
    background-color: #004b8d;
}

.accordion-content {
    padding: 0 18px;
    background-color: #001D3D;
    display: none;
    overflow: hidden;
    transition: max-height 0.2s ease-out;
}

.product-info, .product-actions, .inline-form {
    display: inline-block;
    vertical-align: middle;
    margin-right: 10px;
}

.inline-form button {
    background-color: #4CAF50; /* Green */
    border: none;
    color: white;
    padding: 5px 10px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 16px;
    margin: 4px 2px;
    cursor: pointer;
}

.inline-form button.btn-remove-items {
    background-color: #f44336; /* Red */
}

.product-table {
    width: 100%;
    border-collapse: collapse;
}

.product-table-header, .product-table-row {
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid #ddd;
}

.product-table-header > div, .product-table-row > div {
    padding: 8px;
}

.product-price {
    text-align: left;
    flex: 1;
    font-size: 18px;
    font-weight: bold;
}

.product-name {
    text-align: left;
    flex: 3;
    font-size: 18px;
}

.product-actions {
    text-align: left;
    flex: 3;
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.product-action-form {
    display: inline-block;
}

.product-action-form button {
    padding: 12px 20px;
    background-color: #FFD700;
    color: #001D3D;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 18px;
    font-weight: bold;
}

.product-action-form button:hover {
    background-color: #e6c200;
}

.btn-favorite {
    background-color: transparent !important;
    color: #f1c40f !important;
    font-size: 28px !important;
    padding: 0 10px !important;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-favorite:hover {
    color: #d4ac0d !important;
    background-color: rgba(241, 196, 15, 0.1) !important;
}

/* Tablet specific grid layout for frequent customers */
.customer-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    grid-template-rows: repeat(4, 1fr);
    gap: 15px;
    margin-top: 20px;
}

.customer-grid .btn-link {
    width: 100%;
    height: 100%;
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background-color: #003566;
    border: 2px solid #FFD700;
    border-radius: 10px;
    color: #FFD700;
    font-weight: bold;
    text-decoration: none;
    transition: all 0.2s;
}

.customer-grid .btn-link:hover {
    background-color: #FFD700;
    color: #001D3D;
}


.product-action-form:last-child button:hover {
    background-color: #e31b0c;
}

.table-products {
    width: 100%;
}

.category-header {
    cursor: pointer;
    background-color: #003566;
    padding: 8px;
    margin-top: 10px;
    border-radius: 8px;
}


.product-list {
    padding-left: 20px;
    margin-bottom: 10px;
}