/* Mesa Selector Plugin - Public Styles */

#mesa-selector-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    font-family: Arial, sans-serif;
}

#mesa-selector-container h3 {
    text-align: center;
    margin-bottom: 30px;
    color: #333;
}

/* Controle de Zoom */
.mesa-zoom-controls {
    position: fixed;
    right: 30px;
    top: 50%;
    transform: translateY(-50%);
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 15px 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.mesa-zoom-btn {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.mesa-zoom-btn:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.5);
}

.mesa-zoom-btn:active {
    transform: scale(0.95);
}

.mesa-zoom-slider {
    writing-mode: bt-lr; /* IE */
    writing-mode: vertical-lr; /* Standard */
    width: 40px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mesa-zoom-slider input[type="range"] {
    writing-mode: bt-lr; /* IE */
    writing-mode: vertical-lr; /* Standard */
    width: 120px;
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    outline: none;
    transform: rotate(-90deg);
    cursor: pointer;
}

.mesa-zoom-slider input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    width: 20px;
    height: 20px;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(59, 130, 246, 0.4);
}

.mesa-zoom-slider input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border-radius: 50%;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 6px rgba(59, 130, 246, 0.4);
}

/* Container com zoom aplicado */
#mesa-layout {
    transition: transform 0.3s ease;
    transform-origin: center center;
    background: linear-gradient(135deg, #e8f5e8 0%, #d4e7d4 100%);
    border-radius: 10px;
    padding: 30px;
    margin-bottom: 20px;
    position: relative;
}

.mesa-layout-wrapper {
    display: flex;
    align-items: flex-start;
    gap: 20px;
}

.palco-section {
    flex: 0 0 auto;
}

.palco {
    background: #f0f0f0;
    border: 2px solid #ccc;
    border-radius: 5px;
    text-align: center;
    padding: 20px 15px;
    width: 80px;
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 16px;
    color: #333;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    writing-mode: vertical-rl;
    text-orientation: mixed;
}

.mesa-sections-wrapper {
    flex: 1;
    display: flex;
    gap: 40px;
}

.mesa-section {
    flex: 0 0 auto;
}

.mesa-section-main {
    flex: 1;
}

.mesa-section-right {
    flex: 0 0 auto;
    min-width: 300px;
}

/* Fileiras de Mesas */
.mesa-row {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    justify-content: flex-start;
}

.mesa-row-label {
    background: #8e44ad;
    color: white;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    border-radius: 3px;
    margin: 0 5px;
    font-size: 14px;
    flex-shrink: 0;
}

/* Assentos/Mesas */
.mesa-seat {
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 2px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: bold;
    border: 1px solid #ddd;
    cursor: default;
    transition: all 0.3s ease;
    position: relative;
    flex-shrink: 0;
}

/* Estados das Mesas */
.mesa-disponivel {
    background-color: #4CAF50;
    color: white;
    border-color: #388E3C;
}

.mesa-pendente {
    background-color: #f39c12;
    color: white;
    border-color: #e67e22;
}

.mesa-ocupada {
    background-color: #e74c3c;
    color: white;
    border-color: #c0392b;
}

/* Mesa Clicável */
.mesa-clickable {
    cursor: pointer;
}

.mesa-clickable:hover {
    transform: scale(1.1);
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    border-color: #3498db;
}

/* Mesas não clicáveis (pendente e ocupada) */
.mesa-pendente, .mesa-ocupada {
    cursor: not-allowed;
    opacity: 0.8;
}

.mesa-pendente:hover, .mesa-ocupada:hover {
    transform: none;
    box-shadow: none;
}

/* Tooltip para informações do apartamento */
.mesa-tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #333;
    color: white;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 11px;
    white-space: nowrap;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    pointer-events: none;
}

.mesa-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #333;
}

.mesa-seat:hover .mesa-tooltip {
    opacity: 1;
    visibility: visible;
}

/* Legenda */
.mesa-legend {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin: 20px 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 5px;
}

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

.legend-color {
    width: 20px;
    height: 20px;
    border-radius: 3px;
    border: 1px solid #ddd;
}

/* Modal */
.mesa-modal {
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
}

.mesa-modal-content {
    background-color: white;
    padding: 30px;
    border-radius: 10px;
    width: 90%;
    max-width: 500px;
    position: relative;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.mesa-modal-close {
    position: absolute;
    right: 15px;
    top: 15px;
    font-size: 24px;
    cursor: pointer;
    color: #999;
}

.mesa-modal-close:hover {
    color: #333;
}

.mesa-modal h3 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #333;
}

/* Formulário */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #333;
}

.form-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    box-sizing: border-box;
}

.form-group input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 5px rgba(52, 152, 219, 0.3);
}

.form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 30px;
}

.button-primary {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
}

.button-primary:hover {
    background-color: #2980b9;
}

.button-secondary {
    background-color: #95a5a6;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
}

.button-secondary:hover {
    background-color: #7f8c8d;
}

/* Loading */
#mesa-loading {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
    z-index: 1001;
}

