/* Cart Page Styles */

/* Order Mode Section */
.order-mode-section {
    margin-bottom: 24px;
}

.order-mode-section h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.mode-pills {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 8px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.mode-pills::-webkit-scrollbar {
    display: none;
}

.mode-pill {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px 20px;
    background-color: var(--bg-secondary);
    border: 2px solid var(--border);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 100px;
    white-space: nowrap;
}

.mode-pill:hover {
    background-color: var(--bg-tertiary);
    border-color: var(--accent-primary);
}

.mode-pill.active {
    background: var(--gradient);
    border-color: var(--accent-primary);
    color: white;
}

.mode-icon {
    font-size: 24px;
    margin-bottom: 4px;
}

.mode-pill span:last-child {
    font-size: 14px;
    font-weight: 500;
}

/* Cart Items Section */
.cart-items-section {
    margin-bottom: 24px;
}

.cart-items-section h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.cart-items {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.cart-item {
    display: flex;
    align-items: center;
    gap: 12px;
    background-color: var(--bg-secondary);
    border-radius: 12px;
    padding: 16px;
    border: 1px solid var(--border);
    transition: all 0.2s ease;
}

.cart-item:hover {
    border-color: var(--accent-primary);
}

.cart-item-image {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
}

.cart-item-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.cart-item-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.cart-item-price {
    font-size: 14px;
    color: var(--accent-primary);
    font-weight: 500;
}

.cart-item-controls {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

.cart-quantity-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    background-color: var(--bg-tertiary);
    border-radius: 8px;
    padding: 8px;
}

.cart-qty-btn {
    background: var(--gradient);
    color: white;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.cart-qty-btn:hover {
    transform: scale(1.1);
}

.cart-qty-btn:active {
    transform: scale(0.95);
}

.cart-qty-display {
    min-width: 40px;
    text-align: center;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 16px;
}

.cart-item-total {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.remove-item-btn {
    background: none;
    border: none;
    color: var(--error);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.remove-item-btn:hover {
    background-color: rgba(255, 68, 68, 0.1);
}

.remove-item-btn svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

/* Bill Summary */
.bill-summary {
    background-color: var(--bg-secondary);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
    border: 1px solid var(--border);
}

.bill-summary h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    font-size: 14px;
}

.summary-item span:first-child {
    color: var(--text-secondary);
}

.summary-item span:last-child {
    color: var(--text-primary);
    font-weight: 500;
}

.summary-divider {
    height: 1px;
    background-color: var(--border);
    margin: 16px 0;
}

.summary-item.total {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 0;
}

.summary-item.total span:last-child {
    color: var(--accent-primary);
}

/* Checkout Form */
.checkout-form {
    margin-bottom: 24px;
}

.form-section {
    background-color: var(--bg-secondary);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
    border: 1px solid var(--border);
}

.form-section h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px;
    font-size: 14px;
    color: var(--text-primary);
    transition: border-color 0.2s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.form-row {
    display: flex;
    gap: 12px;
}

.form-row .form-group {
    flex: 1;
}

/* Time Slots */
.time-slots {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 8px;
    margin-top: 8px;
}

.time-slot {
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
    font-weight: 500;
}

.time-slot:hover {
    background-color: var(--bg-primary);
    border-color: var(--accent-primary);
}

.time-slot.selected {
    background: var(--gradient);
    border-color: var(--accent-primary);
    color: white;
}

.time-slot.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Table Selection */
.table-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 12px;
    margin-top: 8px;
}

.table-option {
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 16px 12px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.table-option:hover {
    background-color: var(--bg-primary);
    border-color: var(--accent-primary);
}

.table-option.selected {
    background: var(--gradient);
    border-color: var(--accent-primary);
    color: white;
}

.table-option.occupied {
    opacity: 0.5;
    cursor: not-allowed;
    background-color: var(--error);
    color: white;
}

.table-number {
    font-size: 16px;
    font-weight: 600;
}

.table-capacity {
    font-size: 12px;
    opacity: 0.8;
}

/* Confirm Order Button */
.confirm-order-btn {
    width: 100%;
    background: var(--gradient);
    color: white;
    border: none;
    padding: 16px 24px;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    position: relative;
    overflow: hidden;
}

.confirm-order-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.confirm-order-btn:hover::before {
    left: 100%;
}

.confirm-order-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(255, 127, 80, 0.4);
}

.confirm-order-btn:active {
    transform: translateY(0);
}

.confirm-order-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.confirm-order-btn svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

/* Loading State */
.confirm-order-btn.loading span {
    opacity: 0;
}

.confirm-order-btn.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Empty Cart */
.empty-cart {
    text-align: center;
    padding: 60px 20px;
}

.empty-cart .empty-icon {
    font-size: 64px;
    margin-bottom: 20px;
}

.empty-cart h3 {
    font-size: 20px;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.empty-cart p {
    color: var(--text-secondary);
    margin-bottom: 24px;
    font-size: 14px;
}

/* Responsive Design */
@media (min-width: 768px) {
    .mode-pills {
        justify-content: center;
    }
    
    .cart-item {
        flex-direction: row;
        align-items: center;
    }
    
    .cart-item-controls {
        flex-direction: row;
        align-items: center;
    }
    
    .form-row {
        gap: 20px;
    }
}

@media (min-width: 1024px) {
    .cart-content {
        max-width: 800px;
        margin: 0 auto;
    }
}

/* Animation */
.cart-item {
    animation: slideInUp 0.3s ease-out;
}

.cart-item:nth-child(even) {
    animation-delay: 0.1s;
}

.cart-item.removing {
    animation: slideOutRight 0.3s ease-out forwards;
}

@keyframes slideOutRight {
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}