/* Generador de WOD / Rutina de Gym - Shared CSS */

/* Result container */
.gen-result {
    display: none;
    animation: genFadeIn 0.4s ease-out;
}
.gen-result.active {
    display: block;
}

@keyframes genFadeIn {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Content from API (HTML response) */
.gen-result-content strong {
    color: var(--color-primary, #6366f1);
    display: block;
    margin-top: 16px;
    margin-bottom: 8px;
    font-size: 16px;
}
.gen-result-content strong:first-child {
    margin-top: 0;
}
.gen-result-content ul {
    padding-left: 20px;
    margin: 8px 0;
}
.gen-result-content li {
    margin-bottom: 4px;
    line-height: 1.6;
}
.gen-result-content br + br {
    display: none;
}

/* Badges */
.gen-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
}
.gen-badge-tipo {
    background: var(--color-primary, #6366f1);
    color: #fff;
}
.gen-badge-nivel {
    background: #e5e7eb;
    color: #374151;
}
.gen-badge-nivel-PRINCIPIANTE { background: #e5e7eb; color: #374151; }
.gen-badge-nivel-SCALED { background: #dbeafe; color: #1d4ed8; }
.gen-badge-nivel-RX { background: #ffedd5; color: #c2410c; }
.gen-badge-nivel-INTERMEDIO { background: #dbeafe; color: #1d4ed8; }
.gen-badge-nivel-AVANZADO { background: #ffedd5; color: #c2410c; }

/* Copy button state */
.gen-copy-btn.copied {
    background-color: #d1fae5 !important;
    color: #065f46 !important;
}

/* WhatsApp share */
.gen-wa-btn {
    background-color: #25d366 !important;
    color: #fff !important;
}

/* Loading state */
.gen-loading {
    text-align: center;
    padding: 24px;
}
.gen-loading .spinner {
    display: inline-block;
    width: 32px;
    height: 32px;
    border: 3px solid #e5e7eb;
    border-top-color: var(--color-primary, #6366f1);
    border-radius: 50%;
    animation: genSpin 0.6s linear infinite;
}
@keyframes genSpin {
    to { transform: rotate(360deg); }
}

/* No results message */
.gen-no-results {
    text-align: center;
    padding: 24px;
    color: #6b7280;
}

/* Select styling */
.gen-select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    background: #fff;
    transition: border-color 0.2s ease;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%236b7280' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
}
.gen-select:focus {
    border-color: var(--color-primary, #6366f1);
}

/* Mobile adjustments */
@media (max-width: 640px) {
    .gen-result-content strong {
        font-size: 15px;
    }
}
