/**
 * Restaurant Booking Pro - Public Styles
 */

/* Variables CSS (sobrescritas por settings) */
:root {
    --c2e-primary: #2196F3;
    --c2e-secondary: #1976D2;
    --c2e-button: #4CAF50;
    --c2e-background: #FFFFFF;
    --c2e-text: #333333;
    --c2e-table-available: #4CAF50;
    --c2e-table-occupied: #F44336;
    --c2e-table-selected: #FF9800;
}

/* Contenedor Principal */
.c2e-booking-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
    background: var(--c2e-background);
}

/* Tabs de Modo */
.c2e-mode-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    border-bottom: 2px solid #eee;
}

.c2e-mode-tab {
    padding: 15px 30px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    color: #666;
    transition: all 0.3s;
}

.c2e-mode-tab:hover {
    color: var(--c2e-primary);
}

.c2e-mode-tab.active {
    color: var(--c2e-primary);
    border-bottom-color: var(--c2e-primary);
}

.c2e-mode-content {
    display: none;
}

.c2e-mode-content.active {
    display: block;
}

/* Formulario */
.c2e-form-step {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 20px;
}

.c2e-form-step-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.c2e-step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--c2e-primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 18px;
}

.c2e-step-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--c2e-text);
}

.c2e-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.c2e-form-field {
    margin-bottom: 20px;
}

.c2e-form-field label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--c2e-text);
}

.c2e-form-field input,
.c2e-form-field select,
.c2e-form-field textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 15px;
    transition: all 0.3s;
}

.c2e-form-field input:focus,
.c2e-form-field select:focus,
.c2e-form-field textarea:focus {
    outline: none;
    border-color: var(--c2e-primary);
    box-shadow: 0 0 0 4px rgba(33, 150, 243, 0.1);
}

.c2e-form-field textarea {
    min-height: 100px;
    resize: vertical;
}

/* Mapa de Mesas Visual */
.c2e-room-layout {
    position: relative;
    background: #f5f5f5;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    min-height: 500px;
    padding: 20px;
    background-size: 20px 20px;
    background-image: 
        linear-gradient(to right, #e8e8e8 1px, transparent 1px),
        linear-gradient(to bottom, #e8e8e8 1px, transparent 1px);
}

.c2e-table-visual {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s;
    border: 3px solid;
    user-select: none;
}

.c2e-table-visual.round {
    border-radius: 50%;
}

.c2e-table-visual.square {
    border-radius: 8px;
}

.c2e-table-visual.rectangular {
    border-radius: 8px;
}

.c2e-table-visual.available {
    background: var(--c2e-table-available);
    border-color: var(--c2e-table-available);
}

.c2e-table-visual.occupied {
    background: var(--c2e-table-occupied);
    border-color: var(--c2e-table-occupied);
    cursor: not-allowed;
    opacity: 0.6;
}

.c2e-table-visual.selected {
    background: var(--c2e-table-selected);
    border-color: var(--c2e-table-selected);
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(255, 152, 0, 0.4);
}

.c2e-table-visual.available:hover:not(.selected) {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

.c2e-table-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.c2e-table-name {
    font-size: 14px;
}

.c2e-table-capacity {
    font-size: 11px;
    opacity: 0.9;
}

/* Leyenda */
.c2e-legend {
    display: flex;
    gap: 20px;
    margin-top: 20px;
    padding: 15px;
    background: #fff;
    border-radius: 8px;
}

.c2e-legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.c2e-legend-color {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    border: 2px solid;
}

.c2e-legend-color.available {
    background: var(--c2e-table-available);
    border-color: var(--c2e-table-available);
}

.c2e-legend-color.occupied {
    background: var(--c2e-table-occupied);
    border-color: var(--c2e-table-occupied);
}

.c2e-legend-color.selected {
    background: var(--c2e-table-selected);
    border-color: var(--c2e-table-selected);
}

/* Botones */
.c2e-btn {
    padding: 14px 30px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-block;
    text-align: center;
}

.c2e-btn-primary {
    background: var(--c2e-button);
    color: #fff;
}

.c2e-btn-primary:hover {
    background: #388E3C;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

.c2e-btn-secondary {
    background: #757575;
    color: #fff;
}

.c2e-btn-secondary:hover {
    background: #616161;
}

.c2e-btn-block {
    width: 100%;
}

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

/* Mensajes */
.c2e-message {
    padding: 15px 20px;
    border-radius: 6px;
    margin-bottom: 20px;
    border-left: 4px solid;
}

.c2e-message-success {
    background: #E8F5E9;
    color: #2E7D32;
    border-color: #4CAF50;
}

.c2e-message-error {
    background: #FFEBEE;
    color: #C62828;
    border-color: #F44336;
}

.c2e-message-info {
    background: #E3F2FD;
    color: #1565C0;
    border-color: #2196F3;
}

/* Información Seleccionada */
.c2e-selected-info {
    background: #FFF3E0;
    border: 2px solid #FF9800;
    border-radius: 8px;
    padding: 15px;
    margin-top: 20px;
}

.c2e-selected-info h4 {
    margin: 0 0 10px 0;
    color: #E65100;
}

.c2e-selected-tables {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.c2e-selected-table-badge {
    background: #FF9800;
    color: #fff;
    padding: 5px 12px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
}

/* Loading */
.c2e-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.c2e-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--c2e-primary);
    border-radius: 50%;
    animation: c2e-spin 1s linear infinite;
}

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

/* Resumen de Reserva */
.c2e-booking-summary {
    background: linear-gradient(135deg, var(--c2e-primary) 0%, var(--c2e-secondary) 100%);
    color: #fff;
    padding: 30px;
    border-radius: 8px;
    margin: 20px 0;
}

.c2e-booking-summary h3 {
    margin: 0 0 20px 0;
    font-size: 24px;
}

.c2e-summary-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255,255,255,0.2);
}

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

.c2e-summary-label {
    opacity: 0.9;
}

.c2e-summary-value {
    font-weight: 600;
}

/* Responsive */
@media (max-width: 768px) {
    .c2e-booking-container {
        padding: 15px;
    }
    
    .c2e-form-grid {
        grid-template-columns: 1fr;
    }
    
    .c2e-room-layout {
        min-height: 400px;
    }
    
    .c2e-mode-tabs {
        flex-direction: column;
    }
    
    .c2e-mode-tab {
        text-align: center;
    }
    
    .c2e-legend {
        flex-direction: column;
    }
}
