/* General Styling */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    background-color: #f0f2f5;
    color: #333;
    display: flex; /* ADDED/CONFIRMED */
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
    padding: 0;
    box-sizing: border-box;
    overflow-y: hidden; /* CHANGED from auto to hidden for body */
    flex-direction: column; /* ADDED */
}

.container {
    width: 100%;
    max-width: 100%;
    height: 100vh; /* Ensure container takes full viewport height */
    background-color: #fff;
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.1);
    border-radius: 0;
    overflow: hidden; /* Prevents container from overflowing horizontally/vertically */
    display: flex;
    flex-direction: column; /* CONFIRMED */
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 30px;
    background-color: #2c3e50;
    color: #ecf0f1;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
    z-index: 10;
    flex-shrink: 0; /* ADDED */
}

.outlet-name {
    margin: 0;
    font-size: 2em;
    font-weight: 700;
    letter-spacing: 1px;
    color: #f1c40f;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

.header-button {
    background-color: #34495e;
    color: #ecf0f1;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1em;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background-color 0.2s ease, transform 0.1s ease, box-shadow 0.2s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.header-button:hover {
    background-color: #4a627a;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.header-button:active {
    transform: translateY(0);
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.back-button {
    margin-right: auto;
}

.header-right {
    display: flex;
    gap: 15px;
}

/* Authentication Section */
.auth-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-grow: 1; /* ADDED */
    padding: 50px 20px;
    text-align: center;
    background-color: #f8f9fa;
    /* Removed position: relative from here if it was present, as it's not needed for footer positioning with flexbox */
}

.auth-section h2 {
    color: #2c3e50;
    margin-bottom: 30px;
    font-size: 2.5em;
    font-weight: 600;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

.auth-section input {
    width: 100%;
    max-width: 400px;
    padding: 15px 20px;
    margin-bottom: 20px;
    border: 1px solid #c2c9d1;
    border-radius: 10px;
    font-size: 1.2em;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.auth-section input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.1), 0 0 0 3px rgba(52, 152, 219, 0.2);
}

.auth-action-button {
    background-color: #3498db;
    color: #fff;
    border: none;
    padding: 15px 30px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1.3em;
    font-weight: 700;
    transition: background-color 0.2s ease, transform 0.1s ease, box-shadow 0.2s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    max-width: 400px;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.auth-action-button:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.2);
}

.auth-action-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.auth-status {
    margin-top: 25px;
    font-size: 1.2em;
    color: #555;
    font-weight: 500;
}

/* Main Content Area */
.main-content {
    display: flex;
    flex-grow: 1; /* ADDED */
    padding: 25px;
    gap: 25px;
    background-color: #f0f2f5;
    overflow-y: auto; /* CONFIRMED */
    /* Removed position: relative from here if it was present, as it's not needed for footer positioning with flexbox */
}

/* Premium Menu Container */
.menu-container {
    flex: 3;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 30px;
    padding-right: 25px;
    border-right: 1px solid #e0e0e0;
    overflow-y: auto;
    max-height: 100%; /* CHANGED from calc(...) to 100% */
    box-sizing: border-box;
}

.menu-card {
    background: linear-gradient(to bottom, #ffffff 0%, #f9f9f9 100%);
    border: 1px solid rgba(0,0,0,0.05);
    border-radius: 8px;
    overflow: hidden;
    text-align: center;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1;
    max-height: 27vh;
}

.menu-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 100%);
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.menu-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.12);
}

.menu-card:hover::before {
    opacity: 1;
}

.menu-card img {
    width: 100%;
    height: 140px;
    object-fit: cover;
    border-bottom: none;
    transition: transform 0.3s ease;
}

.menu-card:hover img {
    transform: scale(1.03);
}

.menu-card h3 {
    font-size: 1.3em;
    margin: 20px 15px 8px;
    color: #34495e;
    flex-grow: 1;
    padding: 0 10px;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.menu-card p {
    font-size: 1.5em;
    font-weight: 700;
    color: #16a085;
    margin: 8px 0 20px;
    position: relative;
    display: inline-block;
}

.menu-card p::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 2px;
    background: #f1c40f;
    transition: width 0.3s ease;
}

.menu-card:hover p::after {
    width: 60px;
}

/* Order Summary */
.order-summary {
    flex: 1;
    background-color: #ffffff;
    border-left: 1px solid #e0e0e0;
    padding-left: 25px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    overflow-y: auto; /* Allow the entire order summary to scroll if content exceeds its height */
    max-height: 100%; /* CHANGED from calc(...) to 100% */
}

.order-summary h2 {
    padding-top: 15px;
    color: #2c3e50;
    font-size: 1.8em;
    margin-top: 0;
    padding-bottom: 15px; /* Slightly reduced padding */
    border-bottom: 1px solid #e0e0e0;
    margin-bottom: 15px; /* Slightly reduced margin */
    font-weight: 600;
}

.order-items {
    flex-grow: 1;
    overflow-y: auto;
    padding-right: 15px;
    box-sizing: border-box;
    min-height: 50px; /* Prevent it from collapsing completely if empty */
}

.order-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px dashed #e5e5e5;
}

.order-item:last-child {
    border-bottom: none;
}

.item-details {
    flex-grow: 1;
}

.item-details h4 {
    margin: 0;
    font-size: 1.2em;
    color: #555;
    font-weight: 500;
}

.item-details span {
    font-size: 1em;
    color: #888;
}

.quantity-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.quantity-controls button {
    background-color: #e74c3c;
    color: #fff;
    border: none;
    padding: 6px 10px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1em;
    transition: background-color 0.2s ease, transform 0.1s ease;
}

.quantity-controls button.increase {
    background-color: #2ecc71;
}

.quantity-controls button:hover {
    opacity: 0.9;
    transform: scale(1.05);
}

.quantity-controls button:active {
    transform: scale(1);
}

.quantity-controls span {
    font-weight: bold;
    font-size: 1.2em;
    min-width: 25px;
    text-align: center;
    color: #2c3e50;
}

.order-total {
    display: flex;
    justify-content: space-between;
    font-size: 2em;
    font-weight: 700;
    padding: 20px 0;
    border-top: 2px solid #2c3e50;
    margin-top: 20px;
    color: #2c3e50;
    padding-right: 1.5em;
}

.order-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 15px; /* Consistent gap between buttons */
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
    justify-content: center; /* Center buttons when they wrap */
    padding-bottom: 15px; /* Add some padding at the bottom */
}

.action-button {
    width: 100%; /* Default to full width for small screens, overridden by media queries */
    max-width: 250px; /* Limit button width on larger screens */
    padding: 15px 20px; /* Slightly adjusted padding for consistent look */
    border: none;
    border-radius: 10px;
    font-size: 1.1em; /* Slightly smaller font for better fit */
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease, box-shadow 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    margin-right: 0; /* Remove specific margin, let gap handle it */
    margin-bottom: 0; /* Remove specific margin, let gap handle it */
}

.save-button, .update-button {
    background-color: #3498db;
    color: #fff;
}

.save-button:hover, .update-button:hover {
    background-color: #2980b9;
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.2);
}

.save-print-button {
    background-color: #2ecc71;
    color: #fff;
}

.save-print-button:hover {
    background-color: #27ae60;
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.2);
}

.cancel-button {
    background-color: #e74c3c;
    color: #fff;
}

.cancel-button:hover {
    background-color: #c0392b;
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.2);
}

.action-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.no-items, .no-history {
    text-align: center;
    color: #888;
    padding: 20px;
    font-style: italic;
}

/* History View */
.history-view {
    display: flex;
    flex-direction: column;
    padding: 25px;
    flex-grow: 1; /* ADDED */
    background-color: #f0f2f5;
}

.history-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e0e0e0;
}

.date-filter {
    padding: 12px 15px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 1em;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
}

.report-button {
    background-color: #f1c40f;
    color: #2c3e50;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.1em;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background-color 0.2s ease, transform 0.1s ease, box-shadow 0.2s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.report-button:hover {
    background-color: #f39c12;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.history-list {
    flex-grow: 1;
    overflow-y: auto;
    max-height: calc(100vh - 200px); /* KEPT AS IS, adjust if needed in actual app */
    padding-right: 15px;
    box-sizing: border-box;
}

.history-order-card {
    background-color: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.history-order-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

.history-order-card h3 {
    margin-top: 0;
    color: #2c3e50;
    font-size: 1.4em;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px dashed #ddd;
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.history-order-card p {
    margin: 8px 0;
    color: #666;
    font-size: 1em;
}

.history-order-card ul {
    list-style: none;
    padding: 0;
    margin: 15px 0;
    border-top: 1px dashed #e5e5e5;
    padding-top: 15px;
}

.history-order-card li {
    display: flex;
    justify-content: space-between;
    padding: 5px 0;
    font-size: 1em;
    color: #555;
}

.history-order-card .total {
    font-weight: bold;
    font-size: 1.3em;
    margin-top: 15px;
    border-top: 1px solid #ccc;
    padding-top: 10px;
    display: flex;
    justify-content: space-between;
    color: #2c3e50;
}

.history-order-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    border-top: 1px solid #eee;
    padding-top: 15px;
    justify-content: flex-end;
}

.history-order-actions button {
    padding: 10px 15px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.95em;
    font-weight: 500;
    transition: background-color 0.2s ease, transform 0.1s ease, box-shadow 0.2s ease;
    display: flex;
    align-items: center;
    gap: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.history-order-actions .edit-button {
    background-color: #3498db;
    color: #fff;
}

.history-order-actions .edit-button:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.history-order-actions .reprint-button {
    background-color: #9b59b6;
    color: #fff;
}

.history-order-actions .reprint-button:hover {
    background-color: #8e44ad;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

/* Modals */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.6);
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: #fefefe;
    margin: auto;
    padding: 35px;
    border-radius: 15px;
    width: 90%;
    max-width: 550px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    position: relative;
    animation: fadeIn 0.4s ease-out;
}

.close-button {
    color: #aaa;
    float: right;
    font-size: 36px;
    font-weight: bold;
    position: absolute;
    top: 15px;
    right: 25px;
    cursor: pointer;
    transition: color 0.2s ease;
}

.close-button:hover,
.close-button:focus {
    color: #555;
}

.modal h2 {
    margin-top: 0;
    color: #2c3e50;
    text-align: center;
    margin-bottom: 25px;
    font-size: 2em;
    font-weight: 600;
}

.modal-order-items {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #eee;
    padding: 15px;
    margin-bottom: 25px;
    border-radius: 10px;
    background-color: #fcfcfc;
}

.modal-order-items .order-item {
    padding: 10px 0;
    font-size: 1em;
}

.modal-total {
    font-size: 1.8em;
    font-weight: bold;
    text-align: right;
    color: #2c3e50;
    border-top: 1px dashed #ccc;
    padding-top: 20px;
    margin-top: 20px;
}

.modal-actions {
    display: flex;
    gap: 20px;
    margin-top: 30px;
}

.modal-actions .confirm-button {
    flex: 1;
    background-color: #2ecc71;
    color: white;
    font-size: 1.2em;
    padding: 15px 25px;
    border-radius: 10px;
}

.modal-actions .confirm-button:hover {
    background-color: #27ae60;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-30px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Print Styles for Thermal Printer Emulation */
@media print {
    body {
        margin: 0;
        padding: 0;
        background: none;
        font-family: 'Consolas', 'Courier New', monospace;
        color: #000;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    .container, .header, .main-content, .order-summary, .menu-container, .history-view,
    .modal, .action-button, .header-button, .history-controls, .history-order-actions, .auth-section, .footer {
        display: none !important;
    }

    /* Only show the print content */
    .print-receipt-content, .print-report-content {
        display: block !important;
        width: 3in;
        margin: 0 auto;
        padding: 10px;
        box-sizing: border-box;
        font-size: 11px;
        line-height: 1.3;
    }

    .print-receipt-content h2, .print-report-content h2 {
        text-align: center;
        font-size: 16px;
        margin-bottom: 5px;
        font-weight: bold;
    }

    .print-receipt-content .address, .print-receipt-content .datetime,
    .print-receipt-content .order-no, .print-report-content .report-details {
        text-align: center;
        margin-bottom: 5px;
        font-size: 10px;
    }

    .print-receipt-content hr {
        border: none;
        border-top: 1px dashed #000;
        margin: 10px 0;
    }

    .print-receipt-content table {
        width: 100%;
        border-collapse: collapse;
        margin-bottom: 10px;
    }

    .print-receipt-content th, .print-receipt-content td {
        padding: 3px 0;
        text-align: left;
    }

    .print-receipt-content th:nth-child(2),
    .print-receipt-content td:nth-child(2) {
        text-align: center;
    }

    .print-receipt-content th:nth-child(3),
    .print-receipt-content td:nth-child(3) {
        text-align: right;
    }

    .print-receipt-content .total-line {
        font-size: 14px;
        font-weight: bold;
        text-align: right;
        margin-top: 10px;
        padding-top: 5px;
        border-top: 1px solid #000;
    }

    .print-receipt-content .thank-you {
        text-align: center;
        margin-top: 15px;
        font-size: 12px;
        font-weight: bold;
    }

    /* Report specific styles */
    .print-report-content h3 {
        text-align: center;
        font-size: 14px;
        margin-top: 15px;
        margin-bottom: 10px;
        border-bottom: 1px dashed #000;
        padding-bottom: 5px;
    }

    .print-report-content .report-summary {
        margin-bottom: 15px;
    }

    .print-report-content .report-summary p {
        display: flex;
        justify-content: space-between;
        margin: 3px 0;
    }

    .print-report-content .report-orders-list .order-item {
        display: flex;
        justify-content: space-between;
        padding: 2px 0;
        border-bottom: 1px dotted #ccc;
    }
}

/* Temp elements for print to be injected */
.print-receipt-content, .print-report-content {
    display: none;
}

/* Responsive adjustments */
@media (max-width: 1200px) {
    .menu-container {
        grid-template-columns: repeat(5, 1fr);
    }
}

@media (max-width: 992px) {
    .menu-container {
        grid-template-columns: repeat(3, 1fr); /* 3x3 grid for tablets/larger mobiles */
    }
    
    .header {
        padding: 15px 20px;
    }
    
    .header-button {
        padding: 10px 15px;
        font-size: 0.95em;
    }
}

@media (max-width: 768px) {
    .main-content {
        flex-direction: column;
        padding: 15px;
        gap: 15px;
    }
    
    .menu-container {
        grid-template-columns: repeat(3, 1fr); /* Keep 3x3 for consistency on slightly larger phones */
        padding-right: 0;
        border-right: none;
        border-bottom: 1px solid #eee;
        padding-bottom: 15px;
        margin-bottom: 15px;
        max-height: none; /* Allow content to grow and be scrollable if needed */
    }
    
    .order-summary {
        border-left: none;
        padding-left: 0;
    }
    
    .menu-card img {
        height: 120px;
    }
    
    .order-actions {
        flex-direction: row;
        flex-wrap: wrap;
    }
    
    .action-button {
        flex: 1 1 calc(50% - 7.5px); /* Adjusted flex-basis to account for new gap */
        margin-right: 0;
    }
    
    .history-controls {
        flex-wrap: wrap;
    }
    
    .date-filter, .report-button {
        flex: 1 1 100%;
        margin-bottom: 10px;
    }
}

@media (max-width: 576px) {
    .header {
        flex-direction: column;
        gap: 10px;
        padding: 10px;
    }
    
    .outlet-name {
        font-size: 1.8em;
        margin-bottom: 10px;
    }
    
    .header-right {
        width: 100%;
        justify-content: space-between;
    }
    
    .header-button {
        padding: 8px 12px;
        font-size: 0.9em;
    }
    
    .menu-container {
        grid-template-columns: repeat(3, 1fr); /* Enforce 3x3 grid even on smaller phones */
        gap: 10px; /* Reduced gap for tighter fit */
    }
    
    .menu-card {
        max-height: 20vh; /* Adjust height slightly for 3x3 layout */
    }
    
    .menu-card img {
        height: 80px; /* Further reduce image height */
    }
    
    .menu-card h3 {
        font-size: 0.9em; /* Smaller font for item names */
        margin: 5px 2px 2px; /* Reduced margins */
        padding: 0 5px; /* Reduced padding */
    }
    
    .menu-card p {
        font-size: 1.1em; /* Smaller font for price */
        margin: 2px 0 8px; /* Reduced margins */
    }
    
    .order-summary h2 {
        font-size: 1.5em;
        padding-bottom: 15px;
    }
    
    .order-item {
        padding: 8px 0;
    }
    
    .item-details h4 {
        font-size: 1.1em;
    }
    
    .order-total {
        font-size: 1.7em;
    }
    
    .action-button {
        padding: 12px 10px;
        font-size: 1em;
    }
    
    .auth-section h2 {
        font-size: 2em;
    }
    
    .auth-section input, .auth-action-button {
        max-width: 280px;
        padding: 12px 15px;
    }
    
    .history-order-card {
        padding: 15px;
    }
    
    .history-order-card h3 {
        font-size: 1.2em;
    }
    
    .modal-content {
        padding: 25px 15px;
        width: 95%;
    }
}

@media (max-width: 400px) {
    .menu-container {
        grid-template-columns: repeat(3, 1fr); /* Maintain 3x3 even on very small screens */
        gap: 8px; /* Even smaller gap */
    }

    .menu-card {
        max-height: 18vh; /* Adjust height */
    }
    .menu-card img {
        height: 70px; /* Smaller images */
    }
    .menu-card h3 {
        font-size: 0.8em; /* Even smaller font */
    }
    .menu-card p {
        font-size: 1em; /* Even smaller font */
    }
    
    .header-button {
        padding: 6px 10px;
        font-size: 0.85em;
    }
    
    .action-button {
        flex: 1 1 100%;
    }
    
    .order-actions {
        gap: 10px;
    }
    
    .auth-section h2 {
        font-size: 1.8em;
    }
    
    .auth-section input, .auth-action-button {
        max-width: 250px;
    }
}

/* Touch Target Optimizations */
@media (pointer: coarse) {
    .menu-card {
        min-height: 180px;
    }
    
    .header-button, .action-button, .report-button, .auth-action-button { /* Added auth-action-button */
        min-height: 48px; /* Slightly larger for better touch target */
    }
    
    .quantity-controls button {
        min-width: 40px; /* Slightly larger */
        min-height: 40px; /* Slightly larger */
    }
    
    input, select, textarea {
        min-height: 44px;
    }
}

/* Orientation Specific Adjustments */
@media screen and (orientation: portrait) {
    .menu-container {
        max-height: 50vh;
    }
    
    .order-items {
        max-height: 30vh;
    }
}

@media screen and (orientation: landscape) and (max-width: 992px) {
    .menu-container {
        max-height: 70vh;
    }
    
    .order-items {
        max-height: 50vh;
    }
}

/* Footer Styling */
.footer {
    width: 100%;
    padding: 10px 0;
    text-align: center;
    background-color: #2c3e50;
    color: #ecf0f1;
    font-size: 0.9em;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    z-index: 100; /* Ensure it's above other content */
    flex-shrink: 0; /* ADDED */
}

.footer a {
    color: #f1c40f;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.2s ease;
}

.footer a:hover {
    color: #f39c12;
    text-decoration: underline;
}
/* Add these new styles to your existing style.css */

/* Shortcut Badges */
.menu-card {
  position: relative;
}

.shortcut-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background-color: #f1c40f;
  color: #2c3e50;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
  z-index: 2;
  font-size: 0.9em;
}

/* HD 720p Optimization */
@media screen and (min-width: 1280px) {
  .menu-container {
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
  }
  .menu-card {
    max-height: 220px;
  }
  .menu-card img {
    height: 120px;
  }
  .menu-card h3 {
    font-size: 1.1em;
    margin: 12px 10px 5px;
  }
  .menu-card p {
    font-size: 1.3em;
    margin: 5px 0 12px;
  }
  .shortcut-badge {
    width: 22px;
    height: 22px;
    font-size: 0.9em;
  }
}

/* Keyboard Shortcut Feedback */
.keyboard-feedback {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background-color: #2c3e50;
  color: #ecf0f1;
  padding: 10px 20px;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
  z-index: 1000;
  display: none;
  font-weight: 600;
}
