/* Table Reservation System - Frontend Styles */

.trs-booking-container {
    max-width: 800px;
    margin: 0 auto;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.trs-form-header {
    background: linear-gradient(135deg, #F2994A 0%, #d47827 100%);
    color: white;
    padding: 30px;
    text-align: center;
}

.trs-form-header h3 {
    margin: 0 0 20px 0;
    font-size: 28px;
    font-weight: 300;
}

/* Step Indicator */
.trs-step-indicator {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
}

.trs-step {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    font-size: 14px;
}

.trs-step.active {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

.trs-step.completed {
    background: rgba(255, 255, 255, 0.25);
}

.step-number {
    width: 24px;
    height: 24px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

.trs-step.active .step-number {
    background: white;
    color: black;
}

.step-title {
    font-weight: 500;
}

/* Form Steps */
.trs-form-step {
    padding: 40px;
    min-height: 300px;
}

.trs-form-step h4 {
    text-align: center;
    margin-bottom: 30px;
    font-size: 24px;
    color: #333;
    font-weight: 300;
}

/* Party Size Grid */
.trs-party-size-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.trs-party-size-btn {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 16px;
    font-weight: 500;
    color: #495057;
}

.trs-party-size-btn:hover {
    background: #e3f2fd;
    border-color: #F2994A;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.15);
}

.trs-party-size-btn.selected {
    background: #F2994A;
    border-color: #ee7f1d;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.3);
}

/* Date and Time Selection */
.trs-date-time-selection {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 30px;
    margin-bottom: 30px;
}

.trs-date-section label,
.trs-time-section label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: #333;
}

.trs-date-section input[type="date"] {
    width: 100%;
    padding: 12px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.trs-date-section input[type="date"]:focus {
    outline: none;
    border-color: #F2994A;
    box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.1);
}

.trs-time-slots {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 10px;
}

.trs-time-slot {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    padding: 12px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 500;
}

.trs-time-slot:hover {
    background: #e3f2fd;
    border-color: #2196f3;
}

.trs-time-slot.selected {
    background: #F2994A;
    border-color: #d47827;
    color: white;
}

.trs-time-slot.unavailable {
    background: #f5f5f5;
    border-color: #ccc;
    color: #999;
    cursor: not-allowed;
}

/* Form Fields */
.trs-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.trs-form-group {
    margin-bottom: 20px;
}

.trs-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.trs-form-group input,
.trs-form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.trs-form-group input:focus,
.trs-form-group textarea:focus {
    outline: none;
    border-color: #2196f3;
    box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.1);
}

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

/* Reservation Summary */
.trs-reservation-summary {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 25px;
}

.trs-summary-section {
    margin-bottom: 20px;
}

.trs-summary-section:last-child {
    margin-bottom: 0;
}

.trs-summary-section h5 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 18px;
    font-weight: 600;
}

.trs-summary-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    padding: 8px 0;
    border-bottom: 1px solid #e9ecef;
}

.trs-summary-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.trs-summary-item .label {
    font-weight: 500;
    color: #666;
}

.trs-summary-item .value {
    font-weight: 600;
    color: #333;
}

/* Terms Section */
.trs-terms-section {
    margin-bottom: 25px;
}

.trs-checkbox-label {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    font-size: 14px;
    color: #555;
}

.trs-checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
}

/* Buttons */
.trs-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.trs-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.trs-btn-primary {
    background: #F2994A;
    color: white;
}

.trs-btn-primary:hover:not(:disabled) {
    background: #1976d2;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.3);
}

.trs-btn-secondary {
    background: #6c757d;
    color: white;
}

.trs-btn-secondary:hover:not(:disabled) {
    background: #545b62;
    transform: translateY(-1px);
}

.trs-btn-success {
    background: #28a745;
    color: white;
}

.trs-btn-success:hover:not(:disabled) {
    background: #218838;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

/* Form Navigation */
.trs-form-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 30px;
}

.trs-form-navigation .trs-btn {
    min-width: 120px;
}

/* Loading State */
.trs-loading-step {
    text-align: center;
    padding: 60px 40px;
}

.trs-loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e9ecef;
    border-top: 4px solid #2196f3;
    border-radius: 50%;
    animation: trs-spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

/* Success State */
.trs-success-step {
    text-align: center;
    padding: 60px 40px;
}

.trs-success-icon {
    width: 80px;
    height: 80px;
    background: #28a745;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: white;
    font-size: 40px;
    font-weight: bold;
}

.trs-success-step h4 {
    color: #28a745;
    margin-bottom: 10px;
}

/* Error State */
.trs-error-step {
    text-align: center;
    padding: 60px 40px;
}

.trs-error-icon {
    width: 80px;
    height: 80px;
    background: #dc3545;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: white;
    font-size: 40px;
    font-weight: bold;
}

.trs-error-step h4 {
    color: #dc3545;
    margin-bottom: 10px;
}

/* Booking Closed Message */
.trs-booking-closed {
    text-align: center;
    padding: 40px;
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 8px;
    color: #856404;
}

/* Modal Styles */
.trs-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
}

.trs-modal-content {
    background-color: #fff;
    margin: 5% auto;
    width: 90%;
    max-width: 800px;
    border-radius: 12px;
    position: relative;
    animation: trs-modal-appear 0.3s ease;
}

@keyframes trs-modal-appear {
    from { opacity: 0; transform: translateY(-50px); }
    to { opacity: 1; transform: translateY(0); }
}

.trs-close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    position: absolute;
    right: 20px;
    top: 20px;
    z-index: 1;
    cursor: pointer;
}

.trs-close:hover,
.trs-close:focus {
    color: #333;
    text-decoration: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    .trs-booking-container {
        margin: 10px;
        border-radius: 8px;
    }
    
    .trs-form-header {
        padding: 20px;
    }
    
    .trs-form-header h3 {
        font-size: 22px;
    }
    
    .trs-step-indicator {
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .trs-step {
        padding: 6px 12px;
        font-size: 12px;
    }
    
    .step-number {
        width: 20px;
        height: 20px;
        font-size: 10px;
    }
    
    .trs-form-step {
        padding: 20px;
    }
    
    .trs-form-step h4 {
        font-size: 20px;
    }
    
    .trs-party-size-grid {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 10px;
    }
    
    .trs-party-size-btn {
        padding: 15px;
        font-size: 14px;
    }
    
    .trs-date-time-selection {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .trs-form-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .trs-time-slots {
        grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
        gap: 8px;
    }
    
    .trs-time-slot {
        padding: 10px 8px;
        font-size: 12px;
    }
    
    .trs-form-navigation {
        flex-direction: column;
        gap: 15px;
    }
    
    .trs-form-navigation .trs-btn {
        width: 100%;
    }
    
    .trs-modal-content {
        margin: 10% auto;
        width: 95%;
    }
}

@media (max-width: 480px) {
    .trs-party-size-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .trs-time-slots {
        grid-template-columns: repeat(3, 1fr);
    }
}