/* Estilos adicionais para o mapa integrado */
.mapa-container {
    border: 2px solid #ddd;
    border-radius: 10px;
    overflow: hidden;
    background: #f8f9fa;
    padding: 20px;
    margin: 20px 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 1200px;
    margin: 20px auto;
}

#stadium-map-canvas {
    width: 100%;
    max-width: 1000px;
    height: auto;
    cursor: pointer;
    border-radius: 5px;
    border: 1px solid #ddd;
}

.mapa-instrucoes {
    margin: 10px 0 5px 0;
    color: #666;
    font-size: 0.9em;
    font-style: italic;
}

.mapa-instrucoes i {
    color: #c41e3a;
    margin-right: 5px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* Setor selecionado */
#setor-selecionado {
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#setor-selecionado div {
    position: relative;
    overflow: hidden;
}

#setor-selecionado div::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: shine 2s ease-in-out;
}

@keyframes shine {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Responsivo para dispositivos móveis */
@media (max-width: 768px) {
    .mapa-container {
        padding: 15px;
        margin: 15px 5px;
    }
    
    .mapa-instrucoes {
        font-size: 0.8em;
    }
    
    #stadium-map-canvas {
        max-width: 100%;
        width: 100%;
    }
}

@media (max-width: 480px) {
    .mapa-container {
        padding: 10px;
        margin: 10px 2px;
    }
    
    .sector-preview {
        width: 200px;
    }
    
    .sector-preview img {
        height: 110px;
    }
    
    .sector-preview-content {
        padding: 8px;
    }
    
    .sector-preview h4 {
        font-size: 11px;
    }
    
    .sector-preview .price {
        font-size: 14px;
    }
    
    .sector-modal-content {
        margin: 10px;
        max-width: calc(100% - 20px);
    }
    
    .sector-modal-image {
        height: 200px;
    }
    
    .sector-modal-actions {
        flex-direction: column;
    }
    
    .btn-modal {
        margin-bottom: 10px;
    }
    
    .btn-modal:last-child {
        margin-bottom: 0;
    }
    
    .quantity-selector {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .quantity-controls {
        align-self: stretch;
    }
}

/* Animação para feedback de compra */
@keyframes slideInRight {
    from {
        transform: translateX(300px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Efeito hover melhorado no botão de zoom */
.sector-modal-zoom:active {
    transform: scale(0.95);
}

/* Estilo para input de quantidade melhorado */
.quantity-input:focus {
    outline: none;
    background: #f8f9fa;
}

/* Botão de zoom funcional */
.sector-modal-image:hover {
    transform: scale(1.05);
    transition: transform 0.3s ease;
}

.sector-modal-body {
    overflow: hidden;
}

/* Estilos para setores selecionados na lista */
.match_sector.sector-selected {
    transform: translateX(5px);
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(196, 30, 58, 0.3);
}

.match_sector.sector-selected::before {
    content: '👆';
    position: absolute;
    left: -30px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 20px;
    animation: bounce 1s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(-50%);
    }
    40% {
        transform: translateY(-70%);
    }
    60% {
        transform: translateY(-60%);
    }
}

/* Feedback visual melhorado */
#setor-selecionado {
    position: relative;
    overflow: hidden;
}

#setor-selecionado.success {
    background: linear-gradient(45deg, #d4edda, #c3e6cb) !important;
}

/* Container sem efeitos adicionais */
.mapa-container {
    position: relative;
}

/* Preview hover dos setores - Design simples */
.sector-preview {
    position: absolute;
    background: white;
    border: 1px solid #ddd;
    padding: 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    z-index: 1000;
    pointer-events: none;
    opacity: 0;
    transform: scale(0.9);
    transition: all 0.2s ease;
    width: 250px;
    overflow: hidden;
}

.sector-preview.show {
    opacity: 1;
    transform: scale(1);
}

.sector-preview img {
    width: 100%;
    height: 140px;
    object-fit: cover;
    display: block;
    margin: 0;
}

.sector-preview-content {
    padding: 12px;
    background: white;
}

.sector-preview h4 {
    margin: 0 0 4px 0;
    color: #333;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
}

.sector-preview .price {
    color: #c41e3a;
    font-weight: bold;
    font-size: 16px;
    margin: 0;
}

/* Modal para detalhes do setor - Estilo clean como na imagem */
.sector-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    z-index: 2000;
    display: none;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.sector-modal.show {
    display: flex;
}

.sector-modal-content {
    background: white;
    border-radius: 8px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
    position: relative;
    animation: modalSlideIn 0.3s ease-out;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.sector-modal-header {
    position: relative;
    text-align: center;
    padding: 20px 20px 15px 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
}

.sector-modal-header h3 {
    margin: 0;
    color: #333;
    font-size: 20px;
    font-weight: 600;
}

.sector-modal-subtitle {
    color: #007bff;
    font-size: 14px;
    margin-top: 5px;
}

.sector-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #6c757d;
    padding: 0;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.sector-modal-close:hover {
    background: #f8f9fa;
    color: #495057;
}

.sector-modal-body {
    padding: 0;
    position: relative;
}

.sector-modal-image {
    width: 100%;
    height: 350px;
    object-fit: cover;
    display: block;
}

.sector-modal-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    color: white;
    padding: 30px 25px 25px 25px;
}

.sector-modal-title {
    font-size: 24px;
    font-weight: bold;
    margin: 0 0 8px 0;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

.sector-modal-price {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

.sector-modal-zoom {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.9);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #333;
    transition: all 0.2s ease;
}

.sector-modal-zoom:hover {
    background: white;
    transform: scale(1.1);
}

.sector-modal-info {
    padding: 25px;
    background: white;
}

.sector-modal-description {
    color: #666;
    margin: 0 0 20px 0;
    line-height: 1.6;
    font-size: 15px;
}

.quantity-selector {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
}

.quantity-label {
    font-weight: 600;
    color: #333;
    font-size: 16px;
}

.quantity-controls {
    display: flex;
    align-items: center;
    border: 2px solid #dee2e6;
    border-radius: 25px;
    overflow: hidden;
}

.quantity-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: #f8f9fa;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #666;
    transition: all 0.2s ease;
}

.quantity-btn:hover {
    background: #e9ecef;
    color: #333;
}

.quantity-input {
    width: 60px;
    height: 40px;
    border: none;
    text-align: center;
    font-size: 16px;
    font-weight: 600;
    background: white;
    color: #333;
}

.sector-modal-actions {
    padding: 0 25px 25px 25px;
    display: flex;
    gap: 15px;
}

.btn-modal {
    flex: 1;
    padding: 15px 25px;
    border: 2px solid;
    border-radius: 25px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
}

.btn-modal.btn-secondary {
    background: transparent;
    color: #6c757d;
    border-color: #dee2e6;
}

.btn-modal.btn-secondary:hover {
    background: #f8f9fa;
    border-color: #adb5bd;
}

.btn-modal.btn-primary {
    background: #dc3545;
    color: white;
    border-color: #dc3545;
}

.btn-modal.btn-primary:hover {
    background: #c82333;
    border-color: #bd2130;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

/* Estilos melhorados para interação com lista de setores */
.match_sector {
    transition: all 0.3s ease !important;
    cursor: pointer !important;
    border-radius: 8px !important;
    margin: 2px 0 !important;
    position: relative !important;
}

.match_sector:hover {
    background-color: #f0f7ff !important;
    transform: translateX(5px) !important;
    box-shadow: 0 2px 8px rgba(44, 90, 160, 0.15) !important;
}

.match_sector.sector-selected,
.match_sector.sector-highlighted {
    background-color: #e8f4fd !important;
    border-left: 4px solid #2c5aa0 !important;
    box-shadow: 0 2px 12px rgba(44, 90, 160, 0.25) !important;
    transform: translateX(8px) !important;
}

.match_sector-name {
    font-weight: 600 !important;
    color: #333 !important;
    transition: color 0.2s ease !important;
}

.match_sector:hover .match_sector-name {
    color: #2c5aa0 !important;
}

.match_sector.sector-selected .match_sector-name {
    color: #2c5aa0 !important;
    font-weight: 700 !important;
}

/* Indicador visual para setor selecionado */
.match_sector.sector-selected::before {
    content: '📍';
    position: absolute;
    left: -25px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: translateY(-50%) scale(1);
    }
    50% {
        opacity: 0.7;
        transform: translateY(-50%) scale(1.1);
    }
}

/* Melhorar responsividade da lista */
@media (max-width: 768px) {
    .match_sector:hover {
        transform: none !important;
    }
    
    .match_sector.sector-selected {
        transform: none !important;
    }
    
    .match_sector.sector-selected::before {
        left: -20px;
        font-size: 12px;
    }
}

/* Painel lateral para seleção de setor */
.sector-sidebar {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    height: 100vh;
    background: white;
    box-shadow: -2px 0 15px rgba(0,0,0,0.1);
    z-index: 1001;
    transition: right 0.3s ease;
    overflow-y: auto;
}

/* Override: componente removido do layout */
.sector-sidebar, .sidebar-overlay-bg { display: none !important; visibility: hidden !important; }

.sector-sidebar.active {
    right: 0;
}

.sidebar-header {
    background: #1a1a1a;
    color: white;
    padding: 20px;
    text-align: center;
    position: relative;
}

.sidebar-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.sidebar-close {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-content {
    padding: 0;
}

.sidebar-image {
    width: 100%;
    height: 300px;
    position: relative;
    overflow: hidden;
}

.sidebar-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sidebar-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    color: white;
    padding: 30px 20px 20px;
}

.sidebar-overlay h2 {
    margin: 0 0 5px 0;
    font-size: 24px;
    font-weight: 700;
}

.sidebar-overlay .price {
    font-size: 18px;
    margin: 0;
    opacity: 0.9;
}

.sidebar-info {
    padding: 25px 20px;
}

.info-label {
    color: #666;
    font-size: 14px;
    margin-bottom: 10px;
    text-align: center;
}

.quantity-section {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin: 25px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
}

.quantity-btn {
    width: 40px;
    height: 40px;
    border: 2px solid #dc3545;
    background: white;
    color: #dc3545;
    border-radius: 50%;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.quantity-btn:hover {
    background: #dc3545;
    color: white;
}

.quantity-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.quantity-display {
    font-size: 20px;
    font-weight: 600;
    min-width: 40px;
    text-align: center;
}

.sidebar-actions {
    padding: 0 20px 30px;
    display: flex;
    gap: 10px;
}

.sidebar-btn {
    flex: 1;
    padding: 15px 20px;
    border: 2px solid;
    border-radius: 25px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
}

.sidebar-btn.btn-back {
    background: transparent;
    color: #6c757d;
    border-color: #dee2e6;
}

.sidebar-btn.btn-back:hover {
    background: #f8f9fa;
    border-color: #adb5bd;
}

.sidebar-btn.btn-buy {
    background: #dc3545;
    color: white;
    border-color: #dc3545;
}

.sidebar-btn.btn-buy:hover {
    background: #c82333;
    border-color: #bd2130;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

/* Overlay escuro atrás do sidebar */
.sidebar-overlay-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.sidebar-overlay-bg.active {
    opacity: 1;
    visibility: visible;
}

/* Transições suaves para expansão do mapa */
.col-sm-7, .col-sm-12 {
    transition: all 0.4s ease-in-out;
}

.col-sm-5 {
    transition: all 0.3s ease-in-out;
}

/* Melhorar o canvas quando expandido */
#map-canvas {
    transition: all 0.3s ease-in-out;
}

/* Efeito suave na ocultação da lista */
.sector-list-hidden {
    opacity: 0;
    transform: translateX(-50px);
    transition: all 0.3s ease-in-out;
}

/* Responsividade para mobile */
@media (max-width: 768px) {
    .sector-sidebar {
        width: 100%;
        right: -100%;
    }
    
    .sidebar-image {
        height: 250px;
    }
    
    .sidebar-overlay h2 {
        font-size: 20px;
    }
    
    .sidebar-actions {
        flex-direction: column;
    }
    
    /* Em mobile, ocultar lista não expande o mapa */
    .col-sm-12 {
        width: 100% !important;
    }
}

/* Estilos para a visualização do setor selecionado */
.match_sectorView--figure {
    width: 100%;
    max-width: 100%;
    height: 200px;
    background-color: #f0f0f0;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 15px;
    display: none; /* Escondido por padrão */
    align-items: center;
    justify-content: center;
    border: 2px solid #ddd;
}

.match_sectorView--figure.show {
    display: flex !important; /* Mostrar apenas quando necessário */
}

.match_sectorView--figure .zoom-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
    display: block;
}

/* Remover debug text */
.match_sectorView--figure img {
    position: relative;
    z-index: 2;
}