/* =====================================================
   ONEXPO 2026 - Sistema de Reservación
   Diseño con Mesas y Sillas Realistas Top-Down
   ===================================================== */

:root {
    /* Colors */
    --primary: #667eea;
    --primary-dark: #5568d3;
    --accent: #ffd700;
    --success: #48bb78;
    --warning: #ed8936;
    --error: #f56565;

    --bg-light: #f8f9fa;
    --bg-white: #ffffff;
    --text-dark: #2d3748;
    --text-muted: #718096;
    --border: #e2e8f0;

    /* Table/Seat Colors */
    --table-wood: #8b6f47;
    --chair-available: #48bb78;
    --chair-reserved: #f56565;
    --chair-selected: #ffd700;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.6;
}

/* =====================================================
   HEADER
   ===================================================== */

.header-main {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1.5rem 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.header-title {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    font-weight: 900;
    margin-bottom: 0;
}

.header-subtitle {
    font-size: 0.875rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    opacity: 0.9;
}

/* =====================================================
   PROGRESS BAR & STEPS
   ===================================================== */

.container-narrow {
    max-width: 900px;
}

.registration-progress .progress {
    height: 6px;
    background: #e2e8f0;
}

.progress-bar {
    background: var(--primary);
    transition: width 0.3s ease;
}

.progress-steps {
    display: flex;
    justify-content: space-between;
    margin-top: 1rem;
}

.progress-steps .step {
    flex: 1;
    text-align: center;
    position: relative;
}

.step-number {
    display: inline-block;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #e2e8f0;
    color: var(--text-muted);
    line-height: 32px;
    font-weight: 600;
    margin-bottom: 0.5rem;
    transition: all 0.3s ease;
}

.step.active .step-number {
    background: var(--primary);
    color: white;
}

.step-label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.step.active .step-label {
    color: var(--primary);
    font-weight: 600;
}

/* =====================================================
   FORM STEPS
   ===================================================== */

.form-step {
    display: none;
}

.form-step.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-navigation {
    display: flex;
    gap: 1rem;
    justify-content: space-between;
}

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

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin: 1rem 0;
}

.service-card {
    border: 2px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    background: white;
}

.service-card:hover {
    border-color: var(--primary);
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.2);
}

.service-card.selected {
    border-color: var(--primary);
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
}

.service-icon {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.service-card h5 {
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.service-card p {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.service-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 1rem;
}

.btn-select-service {
    width: 100%;
}

.service-card.selected .btn-select-service {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* =====================================================
   TABLE SELECTION - REALISTIC TOP-DOWN VIEW
   ===================================================== */

.table-legend {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin: 1.5rem 0;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.legend-indicator {
    width: 16px;
    height: 16px;
    border-radius: 3px;
    border: 2px solid rgba(0, 0, 0, 0.2);
}

.legend-indicator.available {
    background: var(--chair-available);
}

.legend-indicator.reserved {
    background: var(--chair-reserved);
}

.legend-indicator.selected {
    background: var(--chair-selected);
}

.stage-indicator {
    text-align: center;
    padding: 1rem;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    border: 2px solid var(--primary);
    border-radius: 8px;
    margin-bottom: 2rem;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: 0.1em;
}

.stage-indicator i {
    margin-right: 0.5rem;
}

.tables-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 2rem;
    padding: 2rem;
    background: white;
    border-radius: 12px;
    margin-bottom: 1.5rem;
}

/* Mesa Vista Desde Arriba */
.table-item {
    position: relative;
    aspect-ratio: 1;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.table-item:hover {
    transform: scale(1.05);
}

.table-circle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60%;
    height: 60%;
    background: radial-gradient(circle, #a0826d 0%, #8b6f47 50%, #6d5537 100%);
    border-radius: 50%;
    box-shadow:
        0 4px 8px rgba(0, 0, 0, 0.2),
        inset 0 2px 4px rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.table-number {
    font-size: 1.5rem;
    font-weight: 900;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.table-zone-label {
    font-size: 0.625rem;
    color: rgba(255, 255, 255, 0.8);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Sillas Alrededor de la Mesa */
.chair {
    position: absolute;
    width: 18px;
    height: 24px;
    background: var(--chair-available);
    border-radius: 4px 4px 2px 2px;
    border: 2px solid rgba(0, 0, 0, 0.3);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease;
}

.chair::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    right: 2px;
    height: 8px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
}

.chair.reserved {
    background: var(--chair-reserved);
}

.chair.available:hover {
    background: #38a169;
    transform: scale(1.1);
}

/* Posiciones de las 10 sillas alrededor de la mesa */
.chair:nth-child(2) {
    top: 5%;
    left: 50%;
    transform: translateX(-50%) rotate(0deg);
}

.chair:nth-child(3) {
    top: 15%;
    left: 85%;
    transform: translate(-50%, -50%) rotate(36deg);
}

.chair:nth-child(4) {
    top: 40%;
    left: 95%;
    transform: translate(-50%, -50%) rotate(72deg);
}

.chair:nth-child(5) {
    top: 68%;
    left: 90%;
    transform: translate(-50%, -50%) rotate(108deg);
}

.chair:nth-child(6) {
    top: 85%;
    left: 70%;
    transform: translate(-50%, -50%) rotate(144deg);
}

.chair:nth-child(7) {
    top: 95%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(180deg);
}

.chair:nth-child(8) {
    top: 85%;
    left: 30%;
    transform: translate(-50%, -50%) rotate(216deg);
}

.chair:nth-child(9) {
    top: 68%;
    left: 10%;
    transform: translate(-50%, -50%) rotate(252deg);
}

.chair:nth-child(10) {
    top: 40%;
    left: 5%;
    transform: translate(-50%, -50%) rotate(288deg);
}

.chair:nth-child(11) {
    top: 15%;
    left: 15%;
    transform: translate(-50%, -50%) rotate(324deg);
}

.table-availability {
    position: absolute;
    bottom: 5%;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.75rem;
    background: white;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-weight: 600;
    white-space: nowrap;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.table-availability.full {
    background: #fee;
    color: var(--error);
}

.table-availability.available {
    background: #efe;
    color: var(--success);
}

/* =====================================================
   SEATS VIEW IN MODAL
   ===================================================== */

.seats-view {
    position: relative;
    width: 100%;
    max-width: 500px;
    aspect-ratio: 1;
    margin: 2rem auto;
}

.modal-table-circle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50%;
    height: 50%;
    background: radial-gradient(circle, #a0826d 0%, #8b6f47 50%, #6d5537 100%);
    border-radius: 50%;
    box-shadow:
        0 8px 16px rgba(0, 0, 0, 0.3),
        inset 0 4px 8px rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 900;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.modal-seat {
    position: absolute;
    width: 50px;
    height: 65px;
    background: var(--chair-available);
    border-radius: 8px 8px 4px 4px;
    border: 3px solid rgba(0, 0, 0, 0.3);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.modal-seat::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 8px;
    right: 8px;
    height: 20px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
}

.modal-seat .seat-number {
    position: relative;
    z-index: 1;
    font-weight: 700;
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.modal-seat.available:hover {
    background: #38a169;
    transform: scale(1.1);
}

.modal-seat.reserved {
    background: var(--chair-reserved);
    cursor: not-allowed;
    opacity: 0.6;
}

.modal-seat.selected {
    background: var(--chair-selected);
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.6);
    transform: scale(1.1);
}

/* Posiciones de las 10 sillas en el modal */
.modal-seat:nth-of-type(1) {
    top: 5%;
    left: 50%;
    transform: translateX(-50%);
}

.modal-seat:nth-of-type(2) {
    top: 12%;
    left: 80%;
    transform: translate(-50%, -50%) rotate(36deg);
}

.modal-seat:nth-of-type(3) {
    top: 32%;
    left: 92%;
    transform: translate(-50%, -50%) rotate(72deg);
}

.modal-seat:nth-of-type(4) {
    top: 58%;
    left: 88%;
    transform: translate(-50%, -50%) rotate(108deg);
}

.modal-seat:nth-of-type(5) {
    top: 78%;
    left: 70%;
    transform: translate(-50%, -50%) rotate(144deg);
}

.modal-seat:nth-of-type(6) {
    top: 90%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(180deg);
}

.modal-seat:nth-of-type(7) {
    top: 78%;
    left: 30%;
    transform: translate(-50%, -50%) rotate(216deg);
}

.modal-seat:nth-of-type(8) {
    top: 58%;
    left: 12%;
    transform: translate(-50%, -50%) rotate(252deg);
}

.modal-seat:nth-of-type(9) {
    top: 32%;
    left: 8%;
    transform: translate(-50%, -50%) rotate(288deg);
}

.modal-seat:nth-of-type(10) {
    top: 12%;
    left: 20%;
    transform: translate(-50%, -50%) rotate(324deg);
}

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

@media (max-width: 768px) {
    .services-grid {
        grid-template-columns: 1fr;
    }

    .tables-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .header-title {
        font-size: 1.5rem;
    }

    .progress-steps .step-label {
        font-size: 0.65rem;
    }
}

@media (max-width: 480px) {
    .tables-container {
        grid-template-columns: 1fr;
    }
}