/* 1. Importamos la fuente Montserrat */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;600;700&display=swap');

/* =========================================
   ESTILOS GENERALES (Desktop primero)
   ========================================= */

/* Contenedor principal */
.biofenix-ia-container {
    font-family: 'Montserrat', sans-serif !important; /* Forzamos Montserrat */
    color: #333;
    background: #fff;
    /* Padding y margen iniciales para pantallas grandes */
    padding: 40px;
    margin: 30px auto;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    max-width: 600px; /* Ancho máximo en PC */
    width: 100%; /* Ocupa el ancho disponible hasta el max-width */
    line-height: 1.6;
    box-sizing: border-box; /* Asegura que el padding no sume al ancho total */
}

/* Título principal */
.biofenix-ia-container h3 {
    color: #2c3e50;
    text-align: center;
    margin-bottom: 30px;
    font-weight: 700;
    font-size: 24px;
    line-height: 1.3;
    word-wrap: break-word; /* Evita que se corte si la palabra es larga */
}

/* Estilos para cada paso */
.bfx-step {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.bfx-step:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

/* Etiquetas */
.bfx-step label {
    font-weight: 600;
    color: #444;
    display: block;
    margin-bottom: 10px;
    font-size: 16px;
}

/* Textos pequeños */
.bfx-step small, #word-count {
    display: block;
    margin-top: 8px;
    color: #888;
    font-size: 13px;
}

/* Inputs y Textareas */
.bfx-step textarea, 
.bfx-step select,
.bfx-step input[type="text"],
.bfx-step input[type="file"] {
    width: 100%;
    max-width: 100%; /* Asegura que no se salga del contenedor */
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: inherit;
    font-size: 15px;
    color: #555;
    box-sizing: border-box; /* Vital para responsive */
    background: #fcfcfc;
    transition: all 0.3s ease;
}

.bfx-step textarea:focus, 
.bfx-step select:focus {
    border-color: #4CAF50;
    background: #fff;
    outline: none;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

/* Checkboxes de atributos (estilo "pastilla") */
.bfx-atributos {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

.bfx-atributos label {
    font-weight: 500;
    background: #fff;
    color: #555;
    padding: 10px 16px;
    border: 2px solid #eee;
    border-radius: 30px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    margin-bottom: 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.bfx-atributos label:hover {
    border-color: #4CAF50;
    color: #4CAF50;
    background: #f0f9f0;
}

.bfx-atributos input[type="checkbox"] {
    margin-right: 10px;
    accent-color: #4CAF50; /* Color del checkbox nativo */
}

/* Botón Generar */
.btn-generar {
    background-color: #4CAF50;
    color: white;
    padding: 16px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    width: 100%;
    font-size: 18px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: background-color 0.3s ease;
    margin-top: 10px;
}

.btn-generar:hover {
    background-color: #3e8e41;
}

/* Loader */
#bfx-loader {
    text-align: center;
    font-weight: 600;
    color: #4CAF50;
    padding: 20px;
    background: #e8f5e9;
    border-radius: 8px;
    margin-top: 20px;
    border: 2px dashed #4CAF50;
}

/* =========================================
   MEDIA QUERIES (Versión Móvil)
   Se aplica si la pantalla es menor a 768px
   ========================================= */
@media only screen and (max-width: 768px) {
    
    .biofenix-ia-container {
        /* Reducimos drásticamente los márgenes y padding en celular */
        margin: 20px auto; 
        padding: 25px 20px; /* 25px arriba/abajo, 20px a los costados */
        width: 92%; /* Que ocupe casi todo el ancho de la pantalla */
        box-shadow: none; /* Quitamos sombra en móvil para diseño más plano */
        border: 1px solid #eee;
    }

    /* Achicamos un poco el título para que no ocupe tanto */
    .biofenix-ia-container h3 {
        font-size: 20px;
        margin-bottom: 25px;
    }

    .bfx-step label {
        font-size: 15px;
    }

    /* Hacemos que los botones de atributos sean más fáciles de tocar */
    .bfx-atributos label {
        padding: 12px 18px;
        font-size: 15px;
        flex-grow: 1; /* Hacemos que se estiren para llenar huecos */
        justify-content: center;
    }
}