/* Estilos para el frontend del plugin Hotspot */

.hotspot-container {
    position: relative;
    display: inline-block;
    max-width: 100%;
    margin: 20px 0;
}

.hotspot-image-wrapper {
    position: relative;
    display: inline-block;
    line-height: 0;
}

.hotspot-background-image {
    width: 100% !important;
    height: auto !important;
    max-width: 100% !important;
    max-height: 600px !important;
    object-fit: contain !important;
    display: block !important;
    position: relative !important;
}

.hotspot-pin {
    position: absolute;
    z-index: 10;
    cursor: pointer;
    transform: translate(-50%, -50%);
    transition: transform 0.2s ease;
    pointer-events: auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hotspot-pin:hover {
    transform: translate(-50%, -50%) scale(1.1);
}

.pin-icon {
    font-size: 24px;
    width: 36px;
    height: 36px;
    line-height: 1;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
    transition: all 0.2s ease;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    border: 2px solid rgba(255, 255, 255, 0.8);
}

.hotspot-pin:hover .pin-icon {
    text-shadow: 0 4px 8px rgba(0,0,0,0.4);
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

/* Modal */
.hotspot-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.hotspot-modal {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    max-width: 600px;
    max-height: 80vh;
    width: 100%;
    overflow: hidden;
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.hotspot-modal-header {
    position: relative;
    padding: 15px 20px;
    background: #f7f7f7;
    border-bottom: 1px solid #eee;
}

.hotspot-modal-close {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s, color 0.2s;
}

.hotspot-modal-close:hover {
    background-color: rgba(0, 0, 0, 0.03);
    color: #333;
    transform: scale(1.05);
}

.hotspot-modal-body {
    padding: 20px;
    overflow-y: auto;
    max-height: calc(80vh - 100px);
}

.hotspot-modal-body h1,
.hotspot-modal-body h2,
.hotspot-modal-body h3,
.hotspot-modal-body h4,
.hotspot-modal-body h5,
.hotspot-modal-body h6 {
    margin-top: 0;
    margin-bottom: 15px;
}

.hotspot-modal-body p {
    margin-bottom: 15px;
    line-height: 1.6;
}

.hotspot-modal-body img {
    max-width: 100%;
    height: auto;
    border: none;
    box-shadow: none;
    outline: none;
}

.hotspot-modal-body ul,
.hotspot-modal-body ol {
    margin-bottom: 15px;
    padding-left: 25px;
}

.hotspot-modal-body li {
    margin-bottom: 5px;
}

/* Quitar bordes de todos los elementos del modal */
.hotspot-modal-body * {
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
}

.hotspot-modal-body table,
.hotspot-modal-body td,
.hotspot-modal-body th {
    border: none !important;
}

/* Responsive */
@media (max-width: 768px) {
    .hotspot-modal {
        max-width: 95% !important;
        max-height: 90vh;
        margin: 0;
    }
    
    .hotspot-modal-overlay {
        padding: 10px;
    }
    
    .hotspot-modal-body {
        padding: 15px;
        max-height: calc(90vh - 80px);
    }
    
    .hotspot-container {
        width: 100%;
        max-width: 100%;
    }
    
    .hotspot-image-wrapper {
        width: 100%;
    }
    
    .hotspot-background-image {
        width: 100% !important;
        height: auto !important;
        max-width: 100% !important;
        max-height: 600px !important;
        object-fit: contain !important;
    }
    
    .pin-icon {
        font-size: 18px;
        width: 30px;
        height: 30px;
    }
    
    .hotspot-pin {
        /* Hacer los pins un poco más grandes en móvil para mejor touch */
        transform: translate(-50%, -50%) scale(1.1);
    }
    
    .hotspot-pin:hover {
        transform: translate(-50%, -50%) scale(1.2);
    }
}

@media (max-width: 480px) {
    .hotspot-modal {
        max-width: 98% !important;
    }
    
    .hotspot-modal-body {
        padding: 12px;
    }
    
    .hotspot-modal-header {
        padding: 12px 15px;
    }
    
    .pin-icon {
        font-size: 16px;
        width: 28px;
        height: 28px;
    }
    
    .hotspot-pin {
        /* Pins aún más grandes en pantallas muy pequeñas */
        transform: translate(-50%, -50%) scale(1.2);
    }
    
    .hotspot-pin:hover {
        transform: translate(-50%, -50%) scale(1.3);
    }
}