/* Sistema de Ayuda Global - Tooltips y Modales */

/* ===== TOOLTIPS ===== */
.help-tooltip {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.25rem;
    height: 1.25rem;
    background: linear-gradient(135deg, #ac2cc8 0%, #764ba2 100%);
    border-radius: 50%;
    color: white;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-left: 0.5rem;
    vertical-align: middle;
}

.help-tooltip:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.help-tooltip .tooltip-content {
    visibility: hidden;
    opacity: 0;
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    background: #2d3748;
    color: white;
    text-align: center;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.85rem;
    font-weight: 500;
    line-height: 1.4;
    white-space: nowrap;
    z-index: 1000;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(45, 55, 72, 0.3);
    max-width: 200px;
    white-space: normal;
}

.help-tooltip .tooltip-content::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: #2d3748 transparent transparent transparent;
}

.help-tooltip:hover .tooltip-content {
    visibility: visible;
    opacity: 1;
}

/* Variantes de posición del tooltip */
.help-tooltip.tooltip-top .tooltip-content {
    bottom: 125%;
    top: auto;
}

.help-tooltip.tooltip-bottom .tooltip-content {
    top: 125%;
    bottom: auto;
}

.help-tooltip.tooltip-bottom .tooltip-content::after {
    top: auto;
    bottom: 100%;
    border-color: transparent transparent #2d3748 transparent;
}

.help-tooltip.tooltip-left .tooltip-content {
    top: 50%;
    left: auto;
    right: 125%;
    transform: translateY(-50%);
}

.help-tooltip.tooltip-left .tooltip-content::after {
    top: 50%;
    left: 100%;
    right: auto;
    margin-top: -5px;
    margin-left: 0;
    border-color: transparent transparent transparent #2d3748;
}

.help-tooltip.tooltip-right .tooltip-content {
    top: 50%;
    right: auto;
    left: 125%;
    transform: translateY(-50%);
}

.help-tooltip.tooltip-right .tooltip-content::after {
    top: 50%;
    right: 100%;
    left: auto;
    margin-top: -5px;
    margin-left: 0;
    border-color: transparent #2d3748 transparent transparent;
}

/* ===== MODAL DE AYUDA PEQUEÑO ===== */
.help-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 1rem;
    backdrop-filter: blur(4px);
}

.help-modal {
    background: white;
    border-radius: 1rem;
    padding: 0;
    max-width: 500px;
    width: 100%;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.8);
    opacity: 0;
    transition: all 0.3s ease;
    position: relative;
}

.help-modal-overlay.active {
    display: flex;
}

.help-modal-overlay.active .help-modal {
    transform: scale(1);
    opacity: 1;
}

.help-modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1.5rem;
    position: relative;
}

.help-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    width: 2rem;
    height: 2rem;
    color: white;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.help-modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.help-modal-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.help-modal-subtitle {
    font-size: 0.9rem;
    opacity: 0.9;
    margin: 0;
}

.help-modal-body {
    padding: 1.5rem;
    max-height: 60vh;
    overflow-y: auto;
}

.help-modal-body h4 {
    color: #2d3748;
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 0.75rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.help-modal-body p {
    color: #64748b;
    line-height: 1.6;
    margin: 0 0 1rem 0;
    font-size: 0.9rem;
}

.help-modal-body ul {
    color: #64748b;
    margin: 0 0 1rem 0;
    padding-left: 1.25rem;
}

.help-modal-body li {
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    line-height: 1.5;
}

.help-step {
    background: #f8faff;
    border: 1px solid rgba(102, 126, 234, 0.1);
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: start;
    gap: 0.75rem;
}

.help-step-number {
    width: 1.5rem;
    height: 1.5rem;
    background: #667eea;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 600;
    flex-shrink: 0;
}

.help-step-content h5 {
    color: #2d3748;
    font-size: 0.9rem;
    font-weight: 600;
    margin: 0 0 0.25rem 0;
}

.help-step-content p {
    color: #64748b;
    font-size: 0.85rem;
    margin: 0;
    line-height: 1.4;
}

/* ===== BOTÓN DE AYUDA FLOTANTE ===== */
.help-button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 50%;
    width: 2.5rem;
    height: 2.5rem;
    color: white;
    font-size: 1rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.help-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.help-button.small {
    width: 1.75rem;
    height: 1.75rem;
    font-size: 0.8rem;
}

/* ===== AYUDA CONTEXTUAL ===== */
.help-context {
    background: #f0f9ff;
    border: 1px solid #0ea5e9;
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    margin: 0.5rem 0;
    display: flex;
    align-items: start;
    gap: 0.75rem;
    font-size: 0.85rem;
}

.help-context-icon {
    color: #0ea5e9;
    font-size: 1rem;
    margin-top: 0.1rem;
}

.help-context-text {
    color: #0c4a6e;
    line-height: 1.4;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .help-modal {
        max-width: 95%;
        margin: 1rem;
    }
    
    .help-modal-header {
        padding: 1rem;
    }
    
    .help-modal-body {
        padding: 1rem;
    }
    
    .help-tooltip .tooltip-content {
        max-width: 150px;
        font-size: 0.8rem;
        padding: 0.5rem 0.75rem;
    }
}

/* ===== ANIMACIONES ===== */
@keyframes helpPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.help-tooltip.pulse {
    animation: helpPulse 2s infinite;
}

@keyframes helpBounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-5px); }
    60% { transform: translateY(-3px); }
}

.help-button.bounce {
    animation: helpBounce 2s infinite;
}
