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

/* ============================= */
/* VARIABLES */
/* ============================= */

:root {
    --c2e-primary: #2196F3;
    --c2e-secondary: #1976D2;
    --c2e-button: #4CAF50;
    --c2e-background: #FFFFFF;
    --c2e-text: #333333;
    --c2e-table-available: #D0CABC;
    --c2e-table-occupied: #C0504D;
    --c2e-table-selected: #C9A84C;
}

/* ============================= */
/* CONTENEDOR PRINCIPAL */
/* ============================= */

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

/* ============================= */
/* TABS */
/* ============================= */

.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);
}

/* ============================= */
/* GRID */
/* ============================= */

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

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

.c2e-form-grid.c2e-grid-1 {
    grid-template-columns: 1fr;
}

/* ============================= */
/* CAMPOS */
/* ============================= */

.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%;
    height: 50px;
    padding: 0 14px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 15px;
    background: #fff;
    transition: all 0.3s;
    box-sizing: border-box;
}

.c2e-form-field textarea {
    height: auto;
    min-height: 110px;
    padding: 12px 14px;
}

.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);
}

/* ============================= */
/* MAPA VISUAL */
/* ============================= */

/* ============================= */
/* MAPA VISUAL — CONTENEDOR     */
/* ============================= */

/* Badge nombre del salón */
.c2e-room-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(208,202,188,0.08);
    color: rgba(208,202,188,0.6);
    font-size: 10px;
    font-weight: 700;
    padding: 7px 16px;
    border-radius: 0 0 10px 0;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 10;
    letter-spacing: 2px;
    text-transform: uppercase;
    pointer-events: none;
    border-right: 1px solid rgba(208,202,188,0.08);
    border-bottom: 1px solid rgba(208,202,188,0.08);
}

.c2e-room-layout-wrapper {
    position: relative;
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    border-radius: 12px;
    background: #1a2e22;
    box-shadow: 0 8px 40px rgba(0,0,0,0.2);
    scrollbar-width: thin;
    scrollbar-color: rgba(208,202,188,0.15) transparent;
}
.c2e-room-layout-wrapper::-webkit-scrollbar { height: 4px; }
.c2e-room-layout-wrapper::-webkit-scrollbar-thumb {
    background: rgba(208,202,188,0.15);
    border-radius: 2px;
}

.c2e-room-layout {
    position: relative;
    min-width: 100%;
    min-height: 200px;
    padding: 24px;
    box-sizing: border-box;
    background: #1a2e22;
}

/* ============================= */
/* MESAS                         */
/* ============================= */

.c2e-table-visual {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    user-select: none;
    padding: 8px;
    text-align: center;
    box-sizing: border-box;
    overflow: hidden;
    transition: transform 0.2s cubic-bezier(.34,1.56,.64,1),
                box-shadow 0.2s ease;
    /* Sombra base — las mesas "flotan" sobre el piso */
    box-shadow: 0 4px 12px rgba(0,0,0,0.4),
                0 1px 3px rgba(0,0,0,0.3);
}

/* Formas */
.c2e-table-visual.round       { border-radius: 50%; }
.c2e-table-visual.square      { border-radius: 10px; }
.c2e-table-visual.rectangular { border-radius: 10px; }

/* ── DISPONIBLE ── */
.c2e-table-visual.available {
    background: var(--c2e-table-available);
    border: none;
    color: #274231;
}
.c2e-table-visual.available:hover {
    transform: translateY(-4px) scale(1.03);
    box-shadow: 0 10px 28px rgba(0,0,0,0.45),
                0 2px 6px rgba(0,0,0,0.3);
    z-index: 10;
}

/* ── OCUPADA ── */
.c2e-table-visual.occupied {
    background: var(--c2e-table-occupied);
    border: none;
    color: rgba(255,255,255,0.8);
    opacity: 0.55;
    cursor: not-allowed;
    pointer-events: none;
}

/* ── SELECCIONADA ── */
.c2e-table-visual.selected {
    background: var(--c2e-table-selected);
    border: none;
    color: #3a2400;
    transform: translateY(-5px) scale(1.04);
    box-shadow: 0 12px 32px rgba(201,168,76,0.5),
                0 4px 8px rgba(0,0,0,0.3);
    z-index: 5;
}

/* ── TEXTO INTERNO ── */
.c2e-table-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
}

.c2e-table-name {
    font-weight: 700;
    font-size: 11px;
    line-height: 1.2;
    letter-spacing: 0.3px;
    word-break: break-word;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.c2e-table-capacity {
    font-size: 10px;
    font-weight: 400;
    opacity: 0.65;
    white-space: nowrap;
}

/* Ocupada: texto más apagado */
.c2e-table-visual.occupied .c2e-table-name,
.c2e-table-visual.occupied .c2e-table-capacity {
    opacity: 0.5;
}

/* ============================= */
/* LEYENDA                       */
/* ============================= */

.c2e-legend {
    display: flex;
    gap: 20px;
    margin-top: 10px;
    padding: 9px 14px;
    align-items: center;
    flex-wrap: wrap;
    background: rgba(26,46,34,0.06);
    border-radius: 8px;
    border: 1px solid rgba(26,46,34,0.08);
}

.c2e-legend-item {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 12px;
    font-weight: 500;
    color: #555;
}

.c2e-legend-color {
    width: 14px;
    height: 14px;
    border-radius: 3px;
    flex-shrink: 0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

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

/* ============================= */
/* MOBILE — MODO LISTA           */
/* ============================= */

/* Botón para cambiar entre mapa y lista */
.c2e-list-toggle {
    display: block;
    width: 100%;
    padding: 10px 16px;
    background: rgba(208,202,188,0.1);
    color: rgba(208,202,188,0.7);
    border: none;
    border-bottom: 1px solid rgba(208,202,188,0.08);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    cursor: pointer;
    text-align: left;
    transition: background 0.2s;
}
.c2e-list-toggle:hover {
    background: rgba(208,202,188,0.15);
}

/* Lista de mesas */
.c2e-table-list {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.c2e-list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-radius: 10px;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    -webkit-tap-highlight-color: transparent;
}
.c2e-list-item.available {
    background: var(--c2e-table-available);
    color: #274231;
}
.c2e-list-item.occupied {
    background: var(--c2e-table-occupied);
    color: rgba(255,255,255,0.75);
    opacity: 0.6;
    pointer-events: none;
}
.c2e-list-item.selected {
    background: var(--c2e-table-selected);
    color: #3a2400;
    transform: scale(1.02);
    box-shadow: 0 4px 16px rgba(201,168,76,0.4);
}

.c2e-list-item-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.c2e-list-name {
    font-weight: 700;
    font-size: 15px;
}
.c2e-list-cap {
    font-size: 12px;
    opacity: 0.65;
}

.c2e-list-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 500;
    opacity: 0.8;
}
.c2e-list-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}
.c2e-list-dot.available { background: rgba(39,66,49,0.5); }
.c2e-list-dot.occupied  { background: rgba(255,255,255,0.5); }
.c2e-list-dot.selected  { background: rgba(58,36,0,0.6); }

/* Wrapper en modo lista: sin overflow oculto */
.c2e-room-layout-wrapper.c2e-list-active {
    overflow: visible;
    height: auto !important;
}

/* ============================= */
/* FLOOR SHAPE & FIXTURES (PUBLIC) */
/* ============================= */

.c2e-floor-svg-public {
    position: absolute;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 1;
}

/* Fixtures on public map — no container, just icon + label */
.c2e-fixture-public {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    border-radius: 0;
    pointer-events: none;
    user-select: none;
    box-sizing: border-box;
    overflow: visible;
    gap: 2px;
}

.c2e-fixture-public .c2e-fix-icon {
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.c2e-fixture-public .c2e-fix-icon svg {
    width: 100%;
    height: 100%;
}

.c2e-fixture-public .c2e-fix-label {
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    font-size: 8px;
}

/* Type-specific icon colors */
.c2e-fixture-bar .c2e-fix-label { color: #8B7355; }
.c2e-fixture-tree .c2e-fix-icon svg { stroke: #4a7c4a; }
.c2e-fixture-bathroom .c2e-fix-icon svg { stroke: #5a87ad; }
.c2e-fixture-entrance .c2e-fix-icon svg { stroke: #a06840; }
.c2e-fixture-entrance .c2e-fix-label { color: #a06840; }
.c2e-fixture-kitchen .c2e-fix-icon svg { stroke: #8a5a6a; }
.c2e-fixture-kitchen .c2e-fix-label { color: #8a5a6a; }

/* ============================= */
/* RESPONSIVE */
/* ============================= */

@media (max-width: 768px) {
    .c2e-form-grid,
    .c2e-form-grid.c2e-grid-3 {
        grid-template-columns: 1fr;
    }

    .c2e-legend {
        gap: 15px;
    }
}

