/* Tablet-friendly CSS for Restaurant Order System - Dark Theme */

/* General Styles and Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'SF Pro Display', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    background-color: #121212;
    color: #f5f5f5;
    line-height: 1.4;
    padding: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    touch-action: manipulation;
}

.container {
    max-width: 100%;
    margin: 0 auto;
    padding: 20px;
    background-color: #121212;
}

/* Typography */
h1, h2, h3 {
    font-weight: 700;
    color: #f5f5f5;
}

.page-title {
    font-size: 2.2rem;
    color: #FF9800;
    text-align: center;
    margin-bottom: 1.5rem;
    padding-bottom: 0.8rem;
    border-bottom: 3px solid #FF9800;
}

.step-title {
    font-size: 1.6rem;
    color: #f5f5f5;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
}

.step-title::before {
    content: "";
    display: inline-block;
    width: 8px;
    height: 24px;
    background-color: #FF9800;
    margin-right: 10px;
    border-radius: 4px;
}

/* Customization Steps */
.customization-step {
    background-color: #1E1E1E;
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Option Grid Layout */
.option-grid {
    display: grid;
    gap: 12px;
    margin-bottom: 0.5rem;
}

.base-options, .style-options {
    grid-template-columns: repeat(2, 1fr);
}

.topping-options {
    grid-template-columns: repeat(3, 1fr);
}

.sauce-options {
    grid-template-columns: repeat(4, 1fr);
}

.ingredients-grid {
    grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 768px) {
    .ingredients-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .sauce-options {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 480px) {
    .ingredients-grid, .sauce-options {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Option Cards */
.option-card {
    position: relative;
    border-radius: 12px;
    border: 2px solid #3D3D3D;
    overflow: hidden;
    transition: all 0.2s ease;
    background-color: #2D2D2D;
}

.option-card:active {
    transform: scale(0.98);
}

.option-card.selected {
    border-color: #FF9800;
    background-color: #3D3D3D;
}

.hidden-input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.card-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1rem 0.5rem;
    width: 100%;
    height: 100%;
    cursor: pointer;
    text-align: center;
}

.option-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.option-name {
    font-weight: 600;
    font-size: 1rem;
    color: #f5f5f5;
}

/* Radio Cards */
.radio-card.selected::after {
    content: "✓";
    position: absolute;
    top: 8px;
    right: 8px;
    background-color: #FF9800;
    color: white;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

/* Ingredient Counter */
.ingredient-counter {
    text-align: center;
    margin-top: 0.8rem;
    font-weight: 600;
    font-size: 1rem;
    color: #f5f5f5;
}

#selected-count {
    color: #FF9800;
    font-size: 1.2rem;
}

/* Notes Input */
.notes-container {
    position: relative;
}

.notes-input {
    width: 100%;
    padding: 1rem;
    border-radius: 12px;
    border: 2px solid #3D3D3D;
    resize: none;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.2s ease;
    background-color: #2D2D2D;
    color: #f5f5f5;
}

.notes-input:focus {
    outline: none;
    border-color: #FF9800;
}

.notes-input::placeholder {
    color: #888;
}

/* Bottom Action Buttons */
.action-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 2rem;
    margin-bottom: 2rem;
    gap: 1rem;
}

.action-button {
    flex-grow: 1;
    padding: 1rem 0;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.action-button:active {
    transform: translateY(2px);
}

.button-icon {
    margin-right: 8px;
    font-size: 1.2rem;
}

.cancel-button {
    background-color: #424242;
    color: #f5f5f5;
}

.cancel-button:hover {
    background-color: #323232;
}

.submit-button {
    background-color: #FF9800;
    color: #121212;
    font-weight: bold;
}

.submit-button:hover {
    background-color: #F57C00;
}

/* Custom Input Styling */
input[type="checkbox"]:checked + .card-content,
input[type="radio"]:checked + .card-content {
    /* Visual feedback for selected items */
}

/* Override for Disabled States */
.option-card.disabled {
    opacity: 0.5;
    pointer-events: none;
    background-color: #1A1A1A;
}

/* Add subtle animations */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); }
}

.option-card.selected:not(:active) {
    animation: pulse 0.5s ease;
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #2A2A2A;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: #4A4A4A;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #666;
}

/* Alert messages styling */
.alert {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    animation: slideIn 0.3s ease;
}

.alert-success {
    background-color: #1B5E20;
    color: #f5f5f5;
    border-left: 5px solid #4CAF50;
}

.alert-error {
    background-color: #B71C1C;
    color: #f5f5f5;
    border-left: 5px solid #F44336;
}

.alert-content {
    display: flex;
    align-items: center;
}

.alert-content::before {
    content: "✓";
    font-size: 1.2rem;
    margin-right: 10px;
    background-color: #4CAF50;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.alert-error .alert-content::before {
    content: "!";
    background-color: #F44336;
}

@keyframes slideIn {
    0% {
        transform: translateY(-20px);
        opacity: 0;
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Consistent preparation options grid */
.preparation-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 1rem;
}

@media (max-width: 600px) {
    .preparation-options {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 400px) {
    .preparation-options {
        grid-template-columns: 1fr;
    }
}

/* Cart page specific */
.cart-items {
    margin: 20px 0;
}

.cart-item {
    background-color: #1E1E1E;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    padding: 20px;
    margin-bottom: 15px;
    display: grid;
    grid-template-columns: 2fr 1fr;
    grid-template-rows: auto auto;
    grid-template-areas: 
        "details price"
        "quantity actions";
    gap: 15px;
}

.item-details {
    grid-area: details;
}

.item-type {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: #f5f5f5;
}

.item-customizations {
    font-size: 0.95rem;
    color: #BBB;
}

.customization {
    margin-bottom: 4px;
}

.custom-label {
    font-weight: 600;
    color: #CCC;
}

.item-quantity {
    grid-area: quantity;
    display: flex;
    flex-direction: column;
}

.quantity-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #CCC;
    margin-bottom: 5px;
}

.quantity-controls {
    display: flex;
    align-items: center;
    max-width: 130px;
}

.quantity-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background-color: #333;
    color: #f5f5f5;
    font-size: 1.2rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s;
}

.quantity-btn:active {
    background-color: #444;
}

.quantity-input {
    width: 50px;
    text-align: center;
    border: none;
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 8px;
    background-color: #2D2D2D;
    color: #f5f5f5;
    border-color: #3D3D3D;
}

.item-price {
    grid-area: price;
    text-align: right;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.price-original {
    text-decoration: line-through;
    color: #aaa;
    font-size: 0.9rem;
}

.price-discounted {
    font-size: 1.3rem;
    font-weight: 700;
    color: #FF9800;
}

.price-normal {
    font-size: 1.3rem;
    font-weight: 700;
    color: #FF9800;
}

.discount-badge {
    background-color: #FF9800;
    color: #121212;
    font-size: 0.8rem;
    padding: 3px 8px;
    border-radius: 12px;
    margin-top: 5px;
    font-weight: bold;
}

.item-actions {
    grid-area: actions;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    align-items: center;
}

.item-action {
    padding: 8px 12px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    transition: background-color 0.2s;
}

.item-action.edit {
    background-color: #333;
    color: #f5f5f5;
}

.item-action.delete {
    background-color: #3F1F1F;
    color: #FF9090;
}

.order-total {
    display: flex;
    justify-content: flex-end;
    align-items: baseline;
    margin: 30px 0;
    padding: 15px;
    background-color: #232323;
    border-radius: 12px;
}

.total-label {
    font-size: 1.3rem;
    font-weight: 700;
    margin-right: 10px;
    color: #f5f5f5;
}

.total-amount {
    font-size: 1.8rem;
    font-weight: 800;
    color: #FF9800;
}

.order-actions {
    display: flex;
    justify-content: space-between;
    margin: 30px 0;
    gap: 15px;
}

.order-action {
    flex: 1;
    padding: 15px 20px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1.1rem;
    text-align: center;
    text-decoration: none;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.order-action:active {
    transform: translateY(2px);
}

.order-action.secondary {
    background-color: #424242;
    color: #f5f5f5;
}

.order-action.primary {
    background-color: #FF9800;
    color: #121212;
}

.action-icon {
    margin: 0 8px;
}

/* Promotion styles */
.promo-banner {
    background-color: #332D00;
    border-radius: 16px;
    padding: 15px;
    margin-bottom: 20px;
    border: 1px dashed #FF9800;
}

.promo-header {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.promo-icon {
    font-size: 1.5rem;
    margin-right: 10px;
}

.promo-title {
    font-weight: 700;
    font-size: 1.1rem;
    color: #FF9800;
}

.promo-badge {
    background-color: #FF9800;
    color: #121212;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.85rem;
    margin-right: 10px;
}

.coupon-container {
    background-color: #1E1E1E;
    border-radius: 16px;
    padding: 15px;
    margin-bottom: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.coupon-input {
    flex: 1;
    padding: 12px 15px;
    border-radius: 12px;
    border: 2px solid #3D3D3D;
    font-size: 1rem;
    background-color: #2D2D2D;
    color: #f5f5f5;
}

.coupon-input:focus {
    outline: none;
    border-color: #FF9800;
}

.coupon-submit {
    background-color: #FF9800;
    color: #121212;
    border: none;
    border-radius: 12px;
    padding: 0 20px;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.2s;
}

.coupon-submit:active {
    background-color: #F57C00;
}

/* Payment page styles */
.payment-container {
    max-width: 800px;
    margin: 0 auto;
}

.payment-summary {
    background-color: #1E1E1E;
    border-radius: 16px;
    padding: 25px;
    margin: 30px 0;
    display: flex;
    align-items: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.summary-icon {
    font-size: 3rem;
    margin-right: 20px;
    color: #FF9800;
}

.summary-details {
    flex: 1;
}

.summary-label {
    font-size: 1.1rem;
    color: #CCC;
    margin-bottom: 5px;
}

.summary-total {
    font-size: 2.2rem;
    font-weight: 800;
    color: #FF9800;
}

.payment-method-card {
    background-color: #1E1E1E;
    border-radius: 16px;
    padding: 25px;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform 0.2s ease;
    border: 2px solid transparent;
}

.payment-method-card:hover {
    border-color: #FF9800;
}

.method-icon {
    font-size: 3rem;
    margin-bottom: 15px;
    color: #FF9800;
}

.method-name {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: #f5f5f5;
}

.method-description {
    color: #CCC;
    text-align: center;
}

/* Cash payment styles */
.cash-input-container {
    display: flex;
    align-items: center;
    margin: 20px 0;
    background-color: #2D2D2D;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

.input-prefix {
    font-size: 2rem;
    font-weight: 700;
    padding: 0 20px;
    color: #CCC;
}

.cash-input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 20px 0;
    font-size: 2rem;
    font-weight: 700;
    color: #f5f5f5;
    text-align: left;
}

.quick-amount-btn {
    background-color: #333;
    border: none;
    padding: 12px 20px;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    color: #f5f5f5;
    cursor: pointer;
    transition: background-color 0.2s;
}

.calc-btn {
    background-color: #333;
    border: none;
    border-radius: 12px;
    font-size: 1.5rem;
    font-weight: 600;
    padding: 15px 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: all 0.2s ease;
    color: #f5f5f5;
}

.clear-btn {
    background-color: #541818;
    color: #f5f5f5;
}

.change-display {
    background-color: #1B5E20;
    border-radius: 16px;
    padding: 20px;
    margin: 30px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    border: 2px dashed #2E7D32;
}

.change-label {
    font-size: 1.2rem;
    font-weight: 600;
    color: #A5D6A7;
    margin-bottom: 10px;
}

.change-amount {
    font-size: 2.5rem;
    font-weight: 800;
    color: #f5f5f5;
}

.print-button {
    display: block;
    background-color: #FF9800;
    color: #121212;
    padding: 20px 0;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1.2rem;
    text-align: center;
    margin: 30px 0;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(255, 152, 0, 0.3);
    transition: all 0.2s ease;
}

/* Menu page styles */
.menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.menu-item-card {
    background-color: #1E1E1E;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    padding: 20px;
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
    height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.menu-item-name {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: #f5f5f5;
}

.menu-item-price {
    font-size: 1.3rem;
    font-weight: 600;
    color: #FF9800;
}

.cart-button {
    display: flex;
    align-items: center;
    background-color: #FF9800;
    color: #121212;
    padding: 15px 25px;
    border-radius: 50px;
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.4);
    text-decoration: none;
    transition: transform 0.2s ease;
    font-weight: bold;
}

/* Thank you page styles */
.thank-you-container {
    max-width: 600px;
    margin: 50px auto;
    text-align: center;
    background-color: #1E1E1E;
    border-radius: 20px;
    padding: 40px 20px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.success-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 30px;
    background-color: #FF9800;
    color: #121212;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 45px;
    box-shadow: 0 4px 12px rgba(255, 152, 0, 0.3);
    animation: pulse 2s infinite;
}

.thank-you-title {
    font-size: 2.2rem;
    color: #f5f5f5;
    margin-bottom: 30px;
}

.detail-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: #FF9800;
    letter-spacing: 2px;
}

/* Empty states */
.empty-icon {
    font-size: 5rem;
    margin-bottom: 20px;
    color: #555;
}

.empty-action {
    background-color: #FF9800;
    color: #121212;
    padding: 15px 30px;
    border-radius: 12px;
    font-weight: 700;
    text-decoration: none;
    transition: background-color 0.2s;
}

/* Override any button defaults */
button, 
input[type="button"],
input[type="submit"],
.btn {
    background-color: #333 !important; /* Dark background */
    color: #f5f5f5 !important; /* Light text */
    border-color: #444 !important;
}

/* Then apply your specific button styles */
.action-button.submit-button {
    background-color: #FF9800 !important; /* Orange for primary actions */
    color: #121212 !important; /* Dark text on orange background */
}

.action-button.cancel-button {
    background-color: #424242 !important; /* Darker gray for secondary actions */
    color: #f5f5f5 !important; /* Light text */
}