/* ============================================
   AI FINDER - NUEVO DISEÑO CON NIVEL DE MADUREZ
   ============================================ */

/* Badge "Detectado" para categoría auto-detectada */
.category-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    margin-left: 0.5rem;
    padding: 0.25rem 0.5rem;
    background: #219ebc;
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 12px;
    animation: fadeInScale 0.3s ease;
    border: none;
    outline: none;
    pointer-events: none;
    user-select: none;
}

.category-badge svg {
    width: 12px;
    height: 12px;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Nivel de madurez digital */
.maturity-level-selector {
    margin-top: 2rem;
}

.maturity-level-label {
    display: block;
    font-size: 1.1rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 1rem;
    text-align: center;
}

.maturity-level-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.maturity-level-card {
    position: relative;
    cursor: pointer;
    border-radius: 12px;
    background: white;
    border: 2px solid #e2e8f0;
    padding: 1.25rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.maturity-level-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-color: #cbd5e0;
}

.maturity-level-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

/* Estado seleccionado - borde azul y fondo suave */
.maturity-level-card:has(input[type="radio"]:checked) {
    border-color: #0A3D5C;
    border-width: 3px;
    background: linear-gradient(135deg, rgba(10, 61, 92, 0.03) 0%, rgba(30, 64, 175, 0.03) 100%);
    box-shadow: 0 4px 16px rgba(10, 61, 92, 0.2);
}

.maturity-card-content {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* Icono de nivel de madurez */
.maturity-icon {
    font-size: 1.1rem;
    color: #0A3D5C;
    margin-right: 0.5rem;
}

.maturity-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #0A3D5C;
    display: flex;
    align-items: center;
}

.maturity-description {
    font-size: 0.9rem;
    line-height: 1.5;
    color: #64748b;
}

/* Campo personalizado "Otros" */
#customCategoryGroup {
    animation: slideDown 0.3s ease;
    overflow: hidden;
}

@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
        margin-top: 0;
    }
    to {
        opacity: 1;
        max-height: 200px;
        margin-top: 1.5rem;
    }
}

/* Botón CTA estados */
.btn-primary:disabled {
    background: #cbd5e0 !important;
    color: #94a3b8 !important;
    cursor: not-allowed !important;
    opacity: 0.6;
    transform: none !important;
    box-shadow: none !important;
    border: none !important;
    outline: none !important;
}

.btn-primary:disabled:hover {
    background: #cbd5e0 !important;
    transform: none !important;
    border: none !important;
    outline: none !important;
}

/* Botón en estado de carga (loading) */
.btn-primary:disabled .btn-loader {
    border: none !important;
    outline: none !important;
}

/* Hacer texto del loader legible cuando botón está disabled */
.btn-primary:disabled .loader-title,
.btn-primary:disabled .loader-quote {
    color: #062838 !important; /* Azul marino más oscuro */
}

.btn-primary:disabled .spinner .path {
    stroke: #062838 !important;
}

/* Eliminar cualquier outline/border en focus cuando está disabled */
.btn-primary:disabled:focus,
.btn-primary:disabled:focus-visible {
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
}

/* Responsive - Mobile */
@media (max-width: 768px) {
    .maturity-level-options {
        grid-template-columns: 1fr;
    }

    .maturity-level-card {
        padding: 1.25rem;
    }

    .maturity-title {
        font-size: 1rem;
    }

    .maturity-description {
        font-size: 0.85rem;
    }

    .category-badge {
        font-size: 0.7rem;
        padding: 0.2rem 0.4rem;
    }
}

/* Dark mode support (opcional) */
@media (prefers-color-scheme: dark) {
    .maturity-level-label {
        color: #f1f5f9;
    }

    .maturity-level-card {
        background: #1e293b;
        border-color: #334155;
    }

    .maturity-card-content {
        background: #1e293b;
    }

    .maturity-title {
        color: #f1f5f9;
    }

    .maturity-description {
        color: #94a3b8;
    }
}
