/**
 * onboarding-checklist.css
 * Widget flotante persistente "Tu negocio listo" (AHA-6)
 */

/* Botón flotante / Píldora de activación */
.onb-checklist-trigger {
    position: fixed;
    bottom: 24px;
    left: 24px;
    z-index: 9990;
    background: #0f172a;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 9999px;
    padding: 8px 16px 8px 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.05);
    cursor: pointer;
    user-select: none;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.onb-checklist-trigger:hover {
    transform: translateY(-2px) scale(1.02);
    background: #1e293b;
    box-shadow: 0 14px 30px -5px rgba(15, 23, 42, 0.45);
}

.onb-checklist-trigger-icon {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #10b981, #059669);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    color: #ffffff;
    flex-shrink: 0;
}

.onb-checklist-trigger-info {
    display: flex;
    flex-direction: column;
    text-align: left;
    line-height: 1.15;
}

.onb-checklist-trigger-title {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: #f8fafc;
}

.onb-checklist-trigger-progress {
    font-size: 0.72rem;
    color: #94a3b8;
    margin-top: 2px;
}

.onb-checklist-trigger-progress b {
    color: #10b981;
}

.onb-checklist-trigger-badge {
    background: rgba(16, 185, 129, 0.18);
    color: #34d399;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 9999px;
    border: 1px solid rgba(52, 211, 153, 0.3);
}

/* Panel flotante expandido */
.onb-checklist-panel {
    position: fixed;
    bottom: 80px;
    left: 24px;
    z-index: 9995;
    width: 380px;
    max-width: calc(100vw - 48px);
    background: #ffffff;
    border-radius: 18px;
    box-shadow: 0 20px 45px -10px rgba(15, 23, 42, 0.3), 0 0 0 1px rgba(15, 23, 42, 0.08);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 120px);
    animation: onbChecklistPop 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.onb-checklist-panel.d-none {
    display: none !important;
}

/* Encabezado del panel */
.onb-checklist-header {
    background: linear-gradient(135deg, #0f172a, #1e293b);
    color: #ffffff;
    padding: 18px 20px 16px;
    position: relative;
}

.onb-checklist-header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.onb-checklist-header-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1rem;
    font-weight: 800;
    color: #ffffff;
    margin: 0;
}

.onb-checklist-header-close {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #cbd5e1;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s;
}

.onb-checklist-header-close:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

/* Barra de progreso en encabezado */
.onb-checklist-progress-bar-wrap {
    background: rgba(255, 255, 255, 0.12);
    height: 8px;
    border-radius: 9999px;
    overflow: hidden;
    position: relative;
    margin-bottom: 6px;
}

.onb-checklist-progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #10b981, #34d399);
    border-radius: 9999px;
    transition: width 0.4s ease;
}

.onb-checklist-progress-text {
    display: flex;
    justify-content: space-between;
    font-size: 0.74rem;
    color: #cbd5e1;
}

/* Banner de siguiente paso sugerido */
.onb-checklist-next-step-box {
    background: #f0fdf4;
    border-bottom: 1px solid #bbf7d0;
    padding: 10px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    font-size: 0.8rem;
    color: #166534;
}

.onb-checklist-next-step-box b {
    color: #14532d;
}

.onb-checklist-next-step-btn {
    background: #10b981;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    padding: 4px 10px;
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none !important;
    white-space: nowrap;
    transition: background 0.2s;
}

.onb-checklist-next-step-btn:hover {
    background: #059669;
    color: #ffffff;
}

/* Lista de hitos */
.onb-checklist-body {
    padding: 12px 16px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.onb-checklist-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    transition: all 0.2s;
}

.onb-checklist-item:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.onb-checklist-item.is-completed {
    background: #f0fdf4;
    border-color: #dcfce7;
    opacity: 0.85;
}

.onb-checklist-item-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
}

.onb-checklist-item-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: #e2e8f0;
    color: #475569;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    flex-shrink: 0;
}

.onb-checklist-item.is-completed .onb-checklist-item-icon {
    background: #10b981;
    color: #ffffff;
}

.onb-checklist-item-details {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.onb-checklist-item-title {
    font-size: 0.83rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.onb-checklist-item.is-completed .onb-checklist-item-title {
    color: #166534;
    text-decoration: line-through;
}

.onb-checklist-item-desc {
    font-size: 0.72rem;
    color: #64748b;
    margin: 2px 0 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.onb-checklist-item-action {
    flex-shrink: 0;
}

.onb-checklist-item-btn {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    color: #2563eb;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 5px 10px;
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none !important;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all 0.2s;
}

.onb-checklist-item-btn:hover {
    background: #2563eb;
    color: #ffffff;
    border-color: #2563eb;
}

.onb-checklist-item-check {
    color: #10b981;
    font-size: 1.1rem;
    padding-right: 4px;
}

/* Pie del panel */
.onb-checklist-footer {
    padding: 10px 16px;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.75rem;
}

.onb-checklist-footer-link {
    color: #64748b;
    text-decoration: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: color 0.2s;
}

.onb-checklist-footer-link:hover {
    color: #0f172a;
}

/* Estado de Negocio 100% Completado */
.onb-checklist-success-banner {
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    border-radius: 12px;
    padding: 14px;
    text-align: center;
    color: #065f46;
}

.onb-checklist-success-title {
    font-size: 0.95rem;
    font-weight: 800;
    margin: 0 0 4px;
}

.onb-checklist-success-text {
    font-size: 0.78rem;
    color: #047857;
    margin: 0;
}

/* Animación de apertura */
@keyframes onbChecklistPop {
    from {
        opacity: 0;
        transform: translateY(12px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}
