.floor-plans-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    pointer-events: none;
}

.floor-plans-modal.active {
    display: block;
    pointer-events: auto;
}

/* Full screen backdrop */
.floor-plans-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(4px);
    z-index: 40;
    cursor: pointer;
}

/* Modal content - positioned at bottom like React component */
.floor-plans-content {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 0 1rem 5rem 1rem;
    z-index: 50;
    pointer-events: none;
}

.floor-plans-content > * {
    pointer-events: auto;
}

.floor-plans-content .modal-container {
    margin: 0 auto;
    max-width: 42rem; /* max-w-2xl */
    background: white;
    border-radius: 1rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.05);
    overflow: visible; /* Cambiar a visible para permitir que los tooltips se muestren */
    cursor: default;
}

/* Header con título y botón cerrar */
.floor-plans-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    border-bottom: 1px solid #f3f4f6;
}

.floor-plans-header h3 {
    font-size: 1rem;
    font-weight: 600;
    color: #111827;
    font-family: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    margin: 0;
}

.close-button {
    padding: 0.5rem;
    background: none;
    border: none;
    border-radius: 9999px;
    transition: background-color 0.2s;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-button:hover {
    background-color: #f3f4f6;
}

.close-icon {
    width: 1.25rem;
    height: 1.25rem;
    color: #6b7280;
}

/* Imagen del barco - Área principal */
.deck-viewer {
    position: relative;
    background: #f9fafb;
    padding: 1.5rem;
}

.deck-image-container {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

#deck-image {
    max-width: 100%;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 10px 8px rgba(0, 0, 0, 0.04)) drop-shadow(0 4px 3px rgba(0, 0, 0, 0.1));
    max-height: 480px;
}

/* Navigation Points - Hotspots */
#navigation-points {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    /* Container will be sized and positioned by JavaScript to match the actual image */
    transition: all 0.3s ease;
    z-index: 100;
}

.navigation-point {
    position: absolute;
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    transition: all 0.3s ease;
    cursor: pointer;
    pointer-events: auto;
    z-index: 200;
    transform: translate(-50%, -50%);
    touch-action: manipulation;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.navigation-point:hover {
    transform: translate(-50%, -50%) scale(1.3);
}

.navigation-point.current {
    background-color: #1CA3A9; /* Verde para ubicación actual */
    border-color: white;
    animation: pulse 2s infinite;
}

.navigation-point:not(.current) {
    background-color: #ef4444; /* Rojo para puntos disponibles */
    border-color: white;
}

.navigation-point:not(.current):hover {
    background-color: #dc2626; /* Rojo más oscuro en hover */
}

/* Pulse animation for current location */
@keyframes pulse {
    0% {
        transform: translate(-50%, -50%) scale(1);
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2), 0 0 0 0 rgba(28, 163, 169, 0.7);
    }
    50% {
        transform: translate(-50%, -50%) scale(1.1);
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2), 0 0 0 10px rgba(28, 163, 169, 0);
    }
    100% {
        transform: translate(-50%, -50%) scale(1);
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2), 0 0 0 0 rgba(28, 163, 169, 0);
    }
}

/* Remove duplicate ::before rule and animation styles that are no longer needed */

/* Tooltip */
.navigation-point .tooltip {
    position: fixed; /* Cambiar a fixed para que no sea limitado por contenedores padre */
    bottom: auto;
    top: auto;
    left: 50%;
    transform: translateX(-50%) translateY(-100%);
    margin-bottom: 0.75rem;
    padding: 0.375rem 0.75rem;
    background: #111827;
    color: white;
    font-size: 0.75rem;
    border-radius: 0.5rem;
    opacity: 0;
    transition: all 0.2s;
    white-space: nowrap;
    pointer-events: none;
    z-index: 10000 !important; /* Forzar z-index muy alto con !important */
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.navigation-point .tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 4px solid transparent;
    border-top-color: #111827;
}

.navigation-point:hover .tooltip {
    opacity: 1;
}

/* Tabs en la parte inferior */
.deck-selector {
    display: flex;
    justify-content: center;
    background: white;
    border-top: 1px solid #f3f4f6;
    padding: 1rem;
}

.deck-tabs {
    display: inline-flex;
    background: #f3f4f6;
    border-radius: 9999px;
    padding: 0.25rem;
    box-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, 0.06);
}

.deck-button {
    padding: 0.5rem 1.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 9999px;
    transition: all 0.2s;
    white-space: nowrap;
    border: none;
    cursor: pointer;
    background: none;
}

.deck-button.active {
    background: #1DA3A9;
    color: white;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.deck-button:not(.active) {
    color: #4b5563;
}

.deck-button:not(.active):hover {
    color: #111827;
    background: rgba(255, 255, 255, 0.7);
}

/* Responsive adjustments */
@media (min-width: 768px) {
    .floor-plans-content {
        padding: 0 1.5rem 5rem 1.5rem;
    }
}

/* Mobile optimizations */
@media (max-width: 768px) {
    .floor-plans-content {
        padding: 0 1rem 4rem 1rem;
    }
    
    #deck-image {
        max-height: 360px;
    }
    
    .deck-viewer {
        padding: 1rem;
    }
    
    .navigation-point {
        width: 0.5rem;
        height: 0.5rem;
        /* Larger touch target for mobile */
        min-width: 14px;
        min-height: 14px;
        /* Better visual feedback */
        border-width: 1px;
    }
    
    .navigation-point::before {
        width: 0.5rem;
        height: 0.5rem;
        border-width: 1px;
    }
    
    .navigation-point:hover {
        transform: translate(-50%, -50%) scale(1.1);
    }
    
    /* Larger tooltip for mobile */
    .navigation-point .tooltip {
        font-size: 11px;
        padding: 3px 6px;
        margin-bottom: 1rem;
        max-width: 200px;
        white-space: normal;
        text-align: center;
        min-width: 60px;
    }
    
    .deck-button {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
    }
}

/* Extra small mobile devices */
@media (max-width: 480px) {
    .navigation-point {
        width: 0.4rem;
        height: 0.4rem;
        /* Smaller touch area for precise interaction */
        min-width: 12px;
        min-height: 12px;
        border-width: 1px;
    }
    
    .navigation-point::before {
        width: 0.4rem;
        height: 0.4rem;
        border-width: 1px;
    }
    
    .navigation-point .tooltip {
        font-size: 10px;
        padding: 2px 4px;
        margin-bottom: 0.5rem;
        max-width: 120px;
        min-width: 50px;
    }
    
    #deck-image {
        max-height: 300px;
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .floor-plans-container {
    width: 95%;
    max-height: 95vh;
  }
  
  .floor-plans-header {
    padding: 20px 24px;
  }
  
  .floor-plans-header h2 {
    font-size: 24px;
  }
  
  .floor-plans-close {
    width: 40px;
    height: 40px;
    padding: 8px;
  }
  
  .deck-selector {
    padding: 0 24px;
    overflow-x: auto;
  }
  
  .deck-btn {
    padding: 16px 24px;
    font-size: 14px;
    white-space: nowrap;
  }
  
  .deck-viewer {
    padding: 24px;
  }
  
  .deck-image-container {
    padding: 16px;
  }
  
  .nav-point {
    width: 20px;
    height: 20px;
    font-size: 9px;
  }
  
  .deck-info h3 {
    font-size: 20px;
  }
  
  .deck-info p {
    font-size: 14px;
  }
  
  .deck-stats {
    gap: 24px;
  }
  
  .deck-stat-number {
    font-size: 24px;
  }
}

@media (max-width: 480px) {
  .floor-plans-container {
    width: 98%;
    max-height: 98vh;
  }
  
  .floor-plans-header {
    padding: 16px 20px;
  }
  
  .deck-viewer {
    padding: 20px;
  }
  
  .deck-image-container {
    padding: 12px;
  }
}

/* Tooltip for navigation points */
.navigation-point-tooltip {
    position: fixed !important;
    background-color: #1f2937 !important;
    color: white !important;
    padding: 8px 12px !important;
    border-radius: 6px !important;
    border: 2px solid #ffffff !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3) !important;
    font-size: 14px !important;
    font-weight: bold !important;
    white-space: nowrap !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    z-index: 999999 !important;
    /* Usar left: -9999px en lugar de display: none para que mantenga dimensiones */
    left: -9999px !important;
    top: -9999px !important;
}

.navigation-point-tooltip::before {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: #1f2937;
    z-index: 9999;
    display: none; /* Hide arrow for now to eliminate any positioning conflicts */
}

.navigation-point:hover .navigation-point-tooltip {
    /* Removed CSS hover positioning - now controlled entirely by JavaScript */
}