/* ========================================
   KuboPOS - Sistema de Ayuda
   ======================================== */

/* Botón Flotante */
.help-fab {
    position: fixed;
    bottom: 18px;
    left: calc(var(--sidebar-width, 250px) + 18px);
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--primary, #39ff88);
    color: #0f172a;
    border: none;
    cursor: pointer;
    font-size: 1.15rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 14px rgba(57, 255, 136, 0.3);
    z-index: 9998;
    transition: all 0.3s ease;
    font-weight: 700;
}

.help-fab:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 28px rgba(57, 255, 136, 0.5);
}

.help-fab:active {
    transform: scale(0.95);
}

.help-fab .help-fab-pulse {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: rgba(57, 255, 136, 0.25);
    animation: helpPulse 2s ease-out infinite;
    pointer-events: none;
}

@keyframes helpPulse {
    0% { transform: scale(1); opacity: 0.6; }
    100% { transform: scale(1.8); opacity: 0; }
}

/* Overlay */
.help-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.help-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Modal de Ayuda */
.help-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    width: 90%;
    max-width: 520px;
    max-height: 85vh;
    background: var(--bg-card, #1e293b);
    border-radius: 20px;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border-color);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

.help-modal.active {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

/* Header */
.help-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px 16px;
    border-bottom: 1px solid var(--border-color);
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.12) 0%, rgba(59, 130, 246, 0.08) 100%);
}

.help-modal-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.help-modal-title .help-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: rgba(139, 92, 246, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
}

.help-modal-title h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-light);
}

.help-modal-title small {
    display: block;
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 400;
    margin-top: 2px;
}

.help-close-btn {
    background: rgba(148, 163, 184, 0.15);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    color: var(--text-muted);
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.help-close-btn:hover {
    background: rgba(148, 163, 184, 0.3);
    color: var(--text-light);
}

/* Body con steps */
.help-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px 24px;
}

/* Step card */
.help-step {
    display: none;
    animation: helpStepIn 0.35s ease;
}

.help-step.active {
    display: block;
}

@keyframes helpStepIn {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}

.help-step-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(139, 92, 246, 0.15);
    color: #a78bfa;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.help-step-icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 12px;
}

.help-step h4 {
    margin: 0 0 10px;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-light);
}

.help-step p {
    margin: 0;
    font-size: 0.92rem;
    line-height: 1.65;
    color: var(--text-muted);
}

.help-step .help-tip {
    margin-top: 14px;
    padding: 12px 14px;
    background: rgba(57, 255, 136, 0.06);
    border-left: 3px solid var(--primary, #39ff88);
    border-radius: 0 8px 8px 0;
    font-size: 0.85rem;
    color: var(--text-light);
}

.help-step .help-tip strong {
    color: var(--primary, #39ff88);
}

/* Footer con navegación */
.help-modal-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
    background: var(--bg-dark, #0f172a);
}

/* Dots indicator */
.help-dots {
    display: flex;
    gap: 6px;
}

.help-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(148, 163, 184, 0.3);
    transition: all 0.3s;
}

.help-dot.active {
    background: #8b5cf6;
    width: 24px;
    border-radius: 4px;
}

/* Nav buttons */
.help-nav-buttons {
    display: flex;
    gap: 8px;
}

.help-btn {
    padding: 8px 18px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-size: 0.88rem;
    font-weight: 600;
    transition: all 0.2s;
}

.help-btn-prev {
    background: rgba(148, 163, 184, 0.15);
    color: var(--text-muted);
}

.help-btn-prev:hover {
    background: rgba(148, 163, 184, 0.25);
    color: var(--text-light);
}

.help-btn-next {
    background: #8b5cf6;
    color: white;
}

.help-btn-next:hover {
    background: #7c3aed;
}

.help-btn-done {
    background: var(--primary, #39ff88);
    color: #0f172a;
}

.help-btn-done:hover {
    opacity: 0.9;
}

/* Responsive */
@media (max-width: 768px) {
    .help-fab {
        bottom: 14px;
        left: 14px;
        width: 38px;
        height: 38px;
        font-size: 1rem;
    }

    .help-modal {
        width: 95%;
        max-height: 90vh;
    }

    .help-modal-header {
        padding: 16px 18px 12px;
    }

    .help-modal-body {
        padding: 16px 18px;
    }

    .help-modal-footer {
        padding: 12px 18px;
    }
}
