/**
 * Wizard CSS Styles for Autodiagnóstico ISO
 * Custom styles that complement Tailwind
 */

/* ============================================
   STEP INDICATORS
   ============================================ */

.step-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-shrink: 0;
}

.step-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: 600;
    background-color: #334155; /* slate-700 */
    color: #94a3b8; /* slate-400 */
    transition: all 0.3s ease;
}

.step-circle.current {
    background-color: #3b82f6; /* blue-500 */
    color: white;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.2);
}

.step-circle.completed {
    background-color: #22c55e; /* green-500 */
    color: white;
}

.step-label {
    font-size: 0.625rem;
    margin-top: 0.25rem;
    white-space: nowrap;
    max-width: 60px;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
}

.step-connector {
    width: 30px;
    height: 2px;
    background-color: #334155; /* slate-700 */
    flex-shrink: 0;
    margin: 0 4px;
    margin-top: -16px;
}

.step-connector.completed {
    background-color: #22c55e; /* green-500 */
}

/* Hide scrollbar but keep functionality */
.scrollbar-hide {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.scrollbar-hide::-webkit-scrollbar {
    display: none;
}

/* ============================================
   QUESTION CARDS
   ============================================ */

.question-card {
    transition: all 0.3s ease;
}

.question-card:hover {
    border-color: #475569; /* slate-600 */
}

/* ============================================
   RESPONSE SCALE
   ============================================ */

.scale-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 0.5rem;
    background-color: #1e293b; /* slate-800 */
    border: 2px solid #334155; /* slate-700 */
    border-radius: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 70px;
}

.scale-option:hover {
    border-color: #475569; /* slate-600 */
    background-color: #334155; /* slate-700 */
}

.scale-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.scale-option .scale-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: #cbd5e1; /* slate-300 */
    transition: color 0.2s ease;
}

.scale-option .scale-label {
    font-size: 0.625rem;
    color: #64748b; /* slate-500 */
    text-align: center;
    margin-top: 0.25rem;
    line-height: 1.2;
}

/* Selected states by value */
.scale-option.selected[data-value="0"] {
    border-color: #ef4444;
    background-color: rgba(239, 68, 68, 0.1);
}
.scale-option.selected[data-value="0"] .scale-value {
    color: #ef4444;
}

.scale-option.selected[data-value="1"] {
    border-color: #f97316;
    background-color: rgba(249, 115, 22, 0.1);
}
.scale-option.selected[data-value="1"] .scale-value {
    color: #f97316;
}

.scale-option.selected[data-value="2"] {
    border-color: #eab308;
    background-color: rgba(234, 179, 8, 0.1);
}
.scale-option.selected[data-value="2"] .scale-value {
    color: #eab308;
}

.scale-option.selected[data-value="3"] {
    border-color: #84cc16;
    background-color: rgba(132, 204, 22, 0.1);
}
.scale-option.selected[data-value="3"] .scale-value {
    color: #84cc16;
}

.scale-option.selected[data-value="4"] {
    border-color: #3b82f6;
    background-color: rgba(59, 130, 246, 0.1);
}
.scale-option.selected[data-value="4"] .scale-value {
    color: #3b82f6;
}

.scale-option.selected[data-value="5"] {
    border-color: #22c55e;
    background-color: rgba(34, 197, 94, 0.1);
}
.scale-option.selected[data-value="5"] .scale-value {
    color: #22c55e;
}

/* N/A option */
.scale-option.na {
    background-color: #0f172a; /* slate-900 */
}

.scale-option.na.selected {
    border-color: #64748b;
    background-color: rgba(100, 116, 139, 0.1);
}
.scale-option.na.selected .scale-value {
    color: #64748b;
}

/* ============================================
   HELP TOGGLE
   ============================================ */

.help-btn {
    transition: color 0.2s ease;
}

.help-content {
    animation: slideDown 0.2s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   NORM CARDS (INDEX PAGE)
   ============================================ */

.norm-card {
    position: relative;
    overflow: visible;
}

.norm-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 1rem;
    opacity: 0;
    transition: opacity 0.3s ease;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
}

.norm-card:hover::before {
    opacity: 1;
}

/* ============================================
   RESULTS PAGE
   ============================================ */

/* Animated score circle */
@keyframes drawCircle {
    from {
        stroke-dashoffset: 283;
    }
}

.score-circle-animated {
    animation: drawCircle 1.5s ease-out forwards;
}

/* Dimension rows */
.dimension-row {
    transition: all 0.3s ease;
}

.dimension-row:hover {
    transform: translateX(4px);
}

/* ============================================
   LOADING ANIMATION
   ============================================ */

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.animate-spin {
    animation: spin 1s linear infinite;
}

/* ============================================
   CTA BUTTON (matching main styles)
   ============================================ */

.btn-cta-premium {
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    box-shadow: 0 4px 15px rgba(249, 115, 22, 0.4);
    transition: all 0.3s ease;
}

.btn-cta-premium:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(249, 115, 22, 0.5);
}

.btn-cta-premium:active {
    transform: translateY(0);
}

/* ============================================
   RESPONSIVE ADJUSTMENTS
   ============================================ */

@media (max-width: 768px) {
    .step-label {
        display: none;
    }

    .step-circle {
        width: 28px;
        height: 28px;
        font-size: 0.75rem;
    }

    .step-connector {
        width: 20px;
        margin-top: -14px;
    }

    .scale-option {
        padding: 0.5rem 0.25rem;
        min-height: 60px;
    }

    .scale-option .scale-value {
        font-size: 1rem;
    }

    .scale-option .scale-label {
        font-size: 0.5rem;
    }
}

@media (max-width: 480px) {
    .scale-options {
        grid-template-columns: repeat(4, 1fr) !important;
    }

    .scale-option.na {
        grid-column: span 4;
    }
}

/* ============================================
   PRINT STYLES
   ============================================ */

@media print {
    .step-indicators,
    .btn-cta-premium,
    #download-pdf,
    footer {
        display: none !important;
    }

    body {
        background: white;
        color: black;
    }

    .bg-slate-800\/50,
    .bg-slate-800 {
        background: #f8fafc !important;
        border: 1px solid #e2e8f0 !important;
    }
}

/* ============================================
   VALIDATION STATES
   ============================================ */

/* Unanswered question card */
.question-card.unanswered {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.2);
    animation: shake 0.5s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-4px); }
    20%, 40%, 60%, 80% { transform: translateX(4px); }
}

/* Toast notification animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translate(-50%, -20px);
    }
    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
        transform: translate(-50%, 0);
    }
    to {
        opacity: 0;
        transform: translate(-50%, -20px);
    }
}

.animate-fade-in {
    animation: fadeIn 0.3s ease forwards;
}

.animate-fade-out {
    animation: fadeOut 0.3s ease forwards;
}

/* Validation toast */
#validation-toast {
    font-weight: 500;
    font-size: 0.875rem;
}
