﻿/* Contenedor de los botones */
.controls {
    display: flex;
    gap: 12px; /* Espacio más armónico entre los botones */
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
}

/* Estilo base para todos los botones */
.btn {
    padding: 10px 18px; /* Un poco más pequeños */
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.25s ease;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05); /* Sombra muy sutil */
}

/* Botones principales: colores vibrantes */
.btn-primary {
    background: linear-gradient(45deg, #6a82fb, #fc5c7d); /* Gradiente más vibrante y moderno */
    color: white;
}

    .btn-primary:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15); /* Sombra más pronunciada en hover */
    }

/* Botones secundarios: look más limpio */
.btn-secondary {
    background: #f0f4f7; /* Un gris claro muy suave */
    color: #4a5568; /* Texto en un gris oscuro, no negro */
    border: 1px solid #e2e8f0; /* Borde muy sutil */
}

    .btn-secondary:hover {
        transform: translateY(-2px);
        background: #e2e8f0; /* Color de fondo un poco más oscuro en hover */
        box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
        color: #2d3748; /* Texto más oscuro */
    }

/* Estilo para los íconos dentro de los botones */
.btn i {
    font-size: 16px;
    margin-right: -4px; /* Movemos el ícono un poco más cerca del texto */
}

/* Ajustes para el input de tipo file (importar) */
#excelInput {
    display: none;
}

.main-container {
    display: flex;
    height: calc(100vh - 80px);
}

.sidebar {
    width: 300px;
    background: rgba(255,255,255,0.95);
    padding: 10px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    backdrop-filter: blur(10px);
}

.section {
    margin-bottom: 15px;
    background: white;
    border-radius: 15px;
    padding: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

    .section h3 {
        color: #667eea;
        margin-bottom: 15px;
        font-size: 18px;
        border-bottom: 2px solid #f0f0f0;
        padding-bottom: 10px;
    }

.object-menu {
    display: grid;
    grid-template-columns: repeat(3,1fr);
    gap: 10px;
    height: 150px;
    overflow-y: auto;
}

.object-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1px;
    border: 2px solid transparent;
    border-radius: 10px;
    background: #f8f9ff;
    cursor: pointer;
    transition: all .3s;
}

    .object-item:hover {
        border-color: #667eea;
        background: #e8ecff;
    }

    .object-item i {
        font-size: 24px;
        color: #764ba2;
        margin-bottom: 5px;
    }

.guest-list {
    max-height: 150px;
    overflow-y: auto;
}

.guest-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    margin: 5px 0;
    background: #f8f9ff;
    border-radius: 8px;
    cursor: grab;
    user-select: none;
}

.object-item span {
    font-size: 12px;
    text-align: center;
}
<!-- .canvas-container {
    flex: 1;
    padding: 20px;
    position: relative;
    overflow: auto;
    cursor: default;
    background: transparent;
}
-->

/* WRAPPER que define tamaño escalable (para scrollbars) */
#canvas-wrap {
    position: relative;
    width: 1600px; /* base width (se actualiza dinámicamente) */
    height: 800px; /* base height (se actualiza dinámicamente) */
    transition: width 0.12s linear, height 0.12s linear;
}

/* CANVAS real: tiene tamaño base y se escala con transform */
#canvas-container {
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    background: #fdfdff;
    overflow: hidden;
    position: relative;
    margin: auto;
    /*width: 95%;*/
    max-width: 82%;
    height: calc(100vh - 120px);
}

#canvas {
    background-color: transparent;
    position: absolute;
    transform-origin: top left;
    touch-action: none;
}

#infinite-grid {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: linear-gradient(to right, #e0e0e0 1px, transparent 1px), linear-gradient(to bottom, #e0e0e0 1px, transparent 1px);
    background-size: 50px 50px;
    background-position: 0 0;
}

.zoom-controls {
    position: absolute;
    bottom: 20px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 2000;
}

    .zoom-controls button {
        background: rgba(255,255,255,0.95);
        border: 2px solid #667eea;
        border-radius: 50%;
        width: 40px;
        height: 40px;
        cursor: pointer;
        font-size: 18px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

        .zoom-controls button:hover {
            background: #667eea;
            color: white;
        }

/* elementos (mesas y objetos) */
.table, .reference-object {
    position: absolute;
    background: linear-gradient(145deg,#ffffff,#f0f2f8);
    border: 3px solid #667eea;
    cursor: move;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
    transition: all 0.12s ease;
    user-select: none;
}

    .table .seat {
        cursor: default; /* los asientos no arrastran la mesa */
    }

    .table:hover, .reference-object:hover {
        transform: scale(1.03);
        box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    }

.selected {
    box-shadow: 0 12px 35px rgba(102,126,234,0.35);
}

.table-round {
    border-radius: 50%;
}

.table-rectangle {
    border-radius: 20px;
}

.table.square {
    border-radius: 8px;
}

.table.oval {
    border-radius: 50%;
}

.table.u-shape {
    border-top: 3px solid #667eea;
    border-bottom: 3px solid #667eea;
    border-left: 3px solid #667eea;
    border-right: 3px solid #667eea;
    border-radius: 50% 50% 0 0;
}

.table-name {
    /* Posición dentro de la mesa */
    position: relative;
    top: 25px; /* Ajusta la posición vertical dentro de la mesa */
    font-weight: bold;
    color: #667eea;
    font-size: 14px;
    background: rgba(255,255,255,0.9);
    padding: 2px 6px;
    border-radius: 6px;
    white-space: nowrap;
    pointer-events: none;
}

.table-capacity {
    font-size: 12px;
    color: #666;
    pointer-events: none;
    font-weight: bold;
    margin-top: 30px;
    margin-bottom: -22px;
}

.table-controls {
    position: absolute;
    right: -70px;
    display: inline-grid;
    gap: 6px;
    opacity: 0;
    transition: opacity .12s;
}

.table:hover .table-controls, .table.selected .table-controls {
    opacity: 1;
}

.table-controls button {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
}

.table-controls .edit-btn {
    background: #2196F3;
    color: white;
}

.table-controls .rotate-btn {
    background: #ffc107;
    color: white;
}

.table-controls .delete-btn {
    background: #ff4757;
    color: white;
}

.guest-seats {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    max-width: 100%;
    pointer-events: auto;
}

.seat {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #f0f0f0;
    border: 2px solid #ddd;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    position: relative;
    cursor: default;
    pointer-events: auto;
}

    .seat.occupied {
        background: #667eea;
        color: white;
        border-color: #667eea;
    }
    /* Tooltip */
    .seat[data-guest]:hover::after {
        content: attr(data-guest);
        position: absolute;
        bottom: 130%;
        left: 50%;
        transform: translateX(-50%);
        background: rgba(0,0,0,0.85);
        color: #fff;
        padding: 8px 12px;
        border-radius: 12px;
        white-space: nowrap;
        font-size: 14px;
        font-weight: 500;
        z-index: 9999;
        pointer-events: none;
        opacity: 0;
        transition: opacity 0.2s ease-in-out;
        box-shadow: 0 2px 8px rgba(0,0,0,0,0.3);
    }

    .seat[data-guest]:hover::after {
        opacity: 1;
    }

/* estilos referencia */
.reference-object {
    border-radius: 10px;
    padding: 6px 8px;
    font-weight: 700;
    color: white;
    text-align: center;
}

.danceFloor {
    background: linear-gradient(45deg,#ff6b6b,#ffa500);
    border-color: #ff6b6b;
}

.stage {
    background: linear-gradient(45deg,#69BAF0,#69BAF0);
    border-color: darkcyan;
}

.bar {
    background: linear-gradient(45deg,#2196F3,#03a9f4);
    border-color: #2196F3;
}

.wc {
    background: linear-gradient(45deg,#9E9E9E,#607D8B);
    border-color: #9E9E9E;
}

.garden {
    background: linear-gradient(45deg,#4CAF50,#8bc34a);
}

.kitchen {
    background: linear-gradient(45deg,#F79C2D,#F79C2D);
}

.cake {
    background: linear-gradient(45deg,pink,red);
    border-color: #3f51b5;
}

.north {
    background: linear-gradient(45deg,#3f51b5,#2196f3);
    border-color: #3f51b5;
}

.playground {
    background: linear-gradient(45deg,#ff9800,#ffc107);
    border-color: #ff9800;
}
/* Nuevos objetos de referencia */
.candyTable {
    background: linear-gradient(45deg, #ffb6c1, #ff69b4);
    border-color: #ff69b4;
}

.entrance {
    background: linear-gradient(45deg, #8e44ad, #9b59b6);
    border-color: #8e44ad;
}

.reception {
    background: linear-gradient(45deg, #2980b9, #3498db);
    border-color: #2980b9;
}

.photoSpot {
    background: linear-gradient(45deg, #f39c12, #e67e22);
    border-color: #e67e22;
}

.smokingArea {
    background: linear-gradient(45deg,#6b6b6b,#333);
    border-color: #4b4b4b;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    z-index: 3000;
}

.modal-content {
    position: absolute;
    top: 30%;
    left: 20%;
    transform: translate(-50%,-50%);
    background: white;
    padding: 30px;
    border-radius: 20px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow: auto;
}

.modal h3 {
    color: #667eea;
    margin-bottom: 20px;
    font-size: 24px;
}

.form-group {
    margin-bottom: 20px;
}

    .form-group label {
        display: block;
        margin-bottom: 5px;
        font-weight: 600;
        color: #333;
    }

    .form-group input, .form-group select {
        width: 100%;
        padding: 12px;
        border: 2px solid #e0e0e0;
        border-radius: 10px;
        font-size: 16px;
        transition: border-color 0.3s ease;
    }

        .form-group input:focus, .form-group select:focus {
            outline: none;
            border-color: #667eea;
        }

.close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 30px;
    cursor: pointer;
    color: #999;
}

    .close:hover {
        color: #667eea;
    }

.notification {
    position: fixed;
    top: 100px;
    right: 20px;
    background: #4CAF50;
    color: white;
    padding: 15px 20px;
    border-radius: 10px;
    display: none;
    z-index: 4000;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

@media (max-width:768px) {
    .main-container {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        height: 300px;
    }
}

.stats {
    display: flex;
    justify-content: space-around;
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    padding: 10px;
    border-radius: 15px;
    margin-bottom: 15px;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 24px;
    font-weight: bold;
    display: block;
}


.reference-object .table-controls {
    position: absolute;
    top: -40px;
    right: -16px;
    display: flex;
    gap: 6px;
    opacity: 0;
    transition: opacity .12s;
}

.reference-object:hover .table-controls,
.reference-object.selected .table-controls {
    opacity: 1;
}

.reference-object .table-controls button {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
}

.reference-object .rotate-btn {
    background: #ffc107;
    color: white;
}

.reference-object .delete-btn {
    background: #ff4757;
    color: white;
}

<!-- #canvas {
    background: linear-gradient(to right, rgba(0,0,0,0.5) 1px, transparent 1px), -->
    <!-- linear-gradient(to bottom, rgba(0,0,0,0.5) 1px, transparent 1px); -->
    <!-- background-size: 40px 40px; /* Tamaño de la cuadricula */
}
-->

/* 🔹 Estilos para los handlers de redimensionamiento */
.resize-handle {
    position: absolute;
    width: 12px;
    height: 12px;
    background: white;
    border: 2px solid #667eea;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
}

    /* cursores según dirección */
    .resize-handle.n {
        top: -6px;
        left: 50%;
        transform: translateX(-50%);
        cursor: n-resize;
    }

    .resize-handle.s {
        bottom: -6px;
        left: 50%;
        transform: translateX(-50%);
        cursor: s-resize;
    }

    .resize-handle.e {
        right: -6px;
        top: 50%;
        transform: translateY(-50%);
        cursor: e-resize;
    }

    .resize-handle.w {
        left: -6px;
        top: 50%;
        transform: translateY(-50%);
        cursor: w-resize;
    }

    .resize-handle.nw {
        top: -6px;
        left: -6px;
        cursor: nw-resize;
    }

    .resize-handle.ne {
        top: -6px;
        right: -6px;
        cursor: ne-resize;
    }

    .resize-handle.sw {
        bottom: -6px;
        left: -6px;
        cursor: sw-resize;
    }

    .resize-handle.se {
        bottom: -6px;
        right: -6px;
        cursor: se-resize;
    }
