/* Restaurant Booking - Frontend Styles */

/* Calendario Flatpickr - Fechas disponibles y no disponibles */
.flatpickr-calendar {
    font-family: inherit;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border-radius: 8px;
}

.flatpickr-day.rb-date-available {
    background: #e7f7e7 !important;
    border-color: #4CAF50 !important;
}

.flatpickr-day.rb-date-available:hover {
    background: #4CAF50 !important;
    color: white !important;
    border-color: #4CAF50 !important;
}

.flatpickr-day.rb-date-unavailable {
    background: #ffe7e7 !important;
    color: #999 !important;
    border-color: #ffcccc !important;
    cursor: not-allowed !important;
}

.flatpickr-day.rb-date-unavailable:hover {
    background: #ffe7e7 !important;
    color: #999 !important;
    border-color: #ffcccc !important;
}

.flatpickr-day.selected.rb-date-available {
    background: #4CAF50 !important;
    border-color: #4CAF50 !important;
    color: white !important;
}

.rb-calendar-legend {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    color: #666;
}

.rb-booking-form-container {
    max-width: 700px;
    margin: 0 auto;
    padding: 40px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.rb-booking-form-container h2 {
    text-align: center;
    margin-bottom: 35px;
    color: #333;
    font-size: 32px;
    font-weight: 500;
    font-family: 'Playfair Display', serif;
}

/* Steps Indicator */
.rb-steps {
    display: flex;
    justify-content: space-between;
    margin-bottom: 45px;
    position: relative;
}

.rb-steps::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 60px;
    right: 60px;
    height: 2px;
    background: #e0e0e0;
    z-index: 0;
}

.rb-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    position: relative;
    z-index: 1;
}

.rb-step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #e0e0e0;
    color: #999;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-bottom: 8px;
    transition: all 0.3s ease;
}

.rb-step-active .rb-step-number {
    background: #6ba560;
    color: #fff;
}

.rb-step-completed .rb-step-number {
    background: #6ba560;
    color: #fff;
}

.rb-step-completed .rb-step-number::after {
    content: '✓';
}

.rb-step-label {
    font-size: 14px;
    color: #666;
    text-align: center;
}

.rb-step-active .rb-step-label {
    color: #6ba560;
    font-weight: 600;
}

/* Form Steps */
.rb-form-step {
    display: none;
}

.rb-form-step.rb-active {
    display: block;
}

.rb-form-group {
    margin-bottom: 25px;
}

.rb-form-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: #333;
    font-size: 16px;
}

.rb-form-group input[type="text"],
.rb-form-group input[type="email"],
.rb-form-group input[type="tel"],
.rb-form-group input[type="date"],
.rb-form-group textarea {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    transition: border-color 0.3s ease;
    font-family: inherit;
    resize: vertical;
}

.rb-form-group select.rb-menu-select {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    transition: border-color 0.3s ease;
    font-family: inherit;
    background: #fff;
    cursor: pointer;
}

.rb-menu-description {
    font-size: 13px;
    color: #666;
    margin-top: 5px;
    font-style: italic;
}

.rb-menu-preview {
    padding: 12px 0;
}

.rb-btn-view-menu {
    display: inline-block;
    padding: 10px 20px;
    background: #f5f5f5;
    color: #333;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.rb-btn-view-menu:hover {
    background: #e0e0e0;
    border-color: #ccc;
    transform: translateY(-2px);
}

.rb-form-group input:focus,
.rb-form-group textarea:focus,
.rb-form-group select:focus {
    outline: none;
    border-color: #6ba560;
}

.rb-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* Time Slots */
.rb-time-slot-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 15px;
}

.rb-time-slot {
    padding: 18px 12px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 16px;
    font-weight: 600;
    color: #333;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 80px;
    justify-content: center;
}

.rb-time-slot:hover {
    border-color: #6ba560;
    background: rgba(107, 165, 96, 0.08);
    transform: translateY(-2px);
}

.rb-time-slot.rb-selected {
    background: #6ba560;
    color: #fff;
    border-color: #6ba560;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(107, 165, 96, 0.3);
}

.rb-time-slot .rb-time-display {
    font-size: 18px;
    display: block;
}

.rb-time-slot .rb-availability {
    font-size: 12px;
    margin-top: 6px;
    opacity: 0.75;
    font-weight: normal;
}

.rb-time-slot.rb-selected .rb-availability {
    opacity: 0.9;
}

/* People Selector */
.rb-people-selector {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
    padding: 20px 0;
}

.rb-btn-circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 3px solid #6ba560;
    background: #fff;
    color: #6ba560;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    line-height: 1;
    min-width: 60px;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

.rb-btn-circle:active {
    transform: scale(0.95);
}

.rb-btn-circle:hover {
    background: #6ba560;
    color: #fff;
    transform: scale(1.05);
}

.rb-people-selector input {
    width: 100px;
    text-align: center;
    font-size: 42px;
    font-weight: bold;
    border: none;
    color: #333;
    background: transparent;
}

/* Buttons */
.rb-form-actions {
    display: flex;
    gap: 15px;
    margin-top: 35px;
}

.rb-btn {
    flex: 1;
    padding: 16px 30px;
    border: none;
    border-radius: 8px;
    font-size: 17px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.rb-btn-primary {
    background: #6ba560;
    color: #fff;
}

.rb-btn-primary:hover {
    background: #5a9350;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(107, 165, 96, 0.3);
}

.rb-btn-primary:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.rb-btn-secondary {
    background: #f5f5f5;
    color: #333;
}

.rb-btn-secondary:hover {
    background: #e0e0e0;
}

/* Messages */
.rb-messages {
    margin-bottom: 20px;
}

.rb-error {
    padding: 14px 18px;
    background: #ffebee;
    color: #c62828;
    border-radius: 8px;
    border-left: 4px solid #c62828;
    margin-bottom: 15px;
}

.rb-info {
    padding: 14px 18px;
    background: #f5f5f5;
    color: #666;
    border-radius: 8px;
    text-align: center;
}

.rb-info-message {
    padding: 18px 20px;
    background: #e3f2fd;
    color: #1565c0;
    border-radius: 10px;
    border-left: 4px solid #1976d2;
    text-align: center;
    font-size: 15px;
}

.rb-loading {
    text-align: center;
    color: #666;
    padding: 20px;
}

/* Success Message */
.rb-booking-success {
    text-align: center;
    padding: 40px 20px;
}

.rb-success-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: #6ba560;
    color: #fff;
    font-size: 48px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", sans-serif;
}

.rb-booking-success h3 {
    color: #6ba560;
    margin-bottom: 15px;
    font-size: 24px;
}

.rb-payment-info {
    margin-top: 30px;
    padding: 25px;
    background: #f5f5f5;
    border-radius: 10px;
}

.rb-payment-link {
    display: inline-block;
    margin-top: 15px;
}

/* Modal */
.rb-modal {
    display: none;
    position: fixed;
    z-index: 999999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.6);
    backdrop-filter: blur(3px);
}

.rb-modal-content {
    background-color: #fefefe;
    margin: 3% auto;
    padding: 0;
    width: 90%;
    max-width: 750px;
    border-radius: 16px;
    position: relative;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    max-height: 95vh;
    overflow-y: auto;
}

.rb-modal-close {
    position: absolute;
    right: 25px;
    top: 25px;
    color: #999;
    font-size: 32px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
    line-height: 1;
}

.rb-modal-close:hover {
    color: #333;
    background: #f0f0f0;
}

.rb-booking-button {
    padding: 16px 45px;
    background: #6ba560;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.rb-booking-button:hover {
    background: #5a9350;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(107, 165, 96, 0.4);
}

/* Responsive */
@media (max-width: 768px) {
    .rb-booking-form-container {
        padding: 25px 20px;
    }
    
    .rb-booking-form-container h2 {
        font-size: 26px;
    }
    
    .rb-form-row {
        grid-template-columns: 1fr;
    }
    
    .rb-time-slot-grid {
        grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
        gap: 10px;
    }
    
    .rb-time-slot {
        padding: 14px 8px;
        min-height: 70px;
    }
    
    .rb-time-slot .rb-time-display {
        font-size: 16px;
    }
    
    .rb-steps::before {
        left: 40px;
        right: 40px;
    }
    
    .rb-step-label {
        font-size: 12px;
    }
    
    .rb-btn-circle {
        width: 55px;
        height: 55px;
        font-size: 26px;
        border-width: 2px;
    }
    
    .rb-people-selector {
        gap: 20px;
    }
    
    .rb-people-selector input {
        width: 80px;
        font-size: 36px;
    }
    
    .rb-form-actions {
        flex-direction: column;
    }
    
    .rb-modal-content {
        width: 95%;
        margin: 5% auto;
    }
}

@media (max-width: 480px) {
    .rb-time-slot-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Página de cancelación */
.rb-cancel-page {
    max-width: 600px;
    margin: 40px auto;
    padding: 30px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.rb-cancel-page h2 {
    text-align: center;
    color: #333;
    margin-bottom: 30px;
}

.rb-cancel-page h3 {
    color: #333;
    margin-bottom: 15px;
}

.rb-booking-info {
    margin: 30px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

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

.rb-info-table td {
    padding: 10px;
    border-bottom: 1px solid #e0e0e0;
}

.rb-info-table tr:last-child td {
    border-bottom: none;
}

.rb-info-table td:first-child {
    width: 40%;
}

.rb-warning-box {
    margin: 30px 0;
    padding: 20px;
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    border-radius: 4px;
}

.rb-warning-box p {
    margin: 0 0 10px 0;
    color: #856404;
}

.rb-warning-box p:last-child {
    margin-bottom: 0;
}

.rb-info-message {
    margin: 30px 0;
    padding: 20px;
    background: #e3f2fd;
    border-left: 4px solid #2196F3;
    border-radius: 4px;
}

.rb-info-message p {
    margin: 0 0 10px 0;
    color: #0d47a1;
}

.rb-info-message p:last-child {
    margin-bottom: 0;
}

.rb-success-box {
    text-align: center;
    padding: 40px 20px;
}

.rb-success-box .rb-success-icon {
    font-size: 64px;
    margin-bottom: 20px;
}

.rb-success-box h3 {
    color: #4CAF50;
    margin-bottom: 15px;
}

.rb-info-box {
    text-align: center;
    padding: 40px 20px;
}

.rb-info-box h3 {
    color: #2196F3;
    margin-bottom: 15px;
}

.rb-cancel-form {
    margin-top: 30px;
}

.rb-btn-danger {
    background: #ff6b6b;
    color: #fff;
    border: none;
    padding: 12px 30px;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: background 0.3s;
}

.rb-btn-danger:hover {
    background: #ee5a5a;
}

.rb-error {
    padding: 20px;
    background: #ffebee;
    border-left: 4px solid #f44336;
    border-radius: 4px;
    color: #c62828;
}

@media (max-width: 640px) {
    .rb-cancel-page {
        margin: 20px;
        padding: 20px;
    }
    
    .rb-form-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    .rb-form-actions .rb-btn {
        width: 100%;
        text-align: center;
    }
}
