/* =========================================================
   TZALOA AI EXERCISES - FRONTEND STYLES
   ========================================================= */

#cuerpo.justificar .tzaloa-ai-exercise,
#cuerpo.justificar .ia-form {
    max-width: 760px;
    margin: 28px auto;
    background: #ffffff;
    border: 1px solid #d9e1ea;
    border-radius: 16px;
    box-shadow: 0 10px 28px rgba(17, 34, 68, 0.08);
    overflow: hidden;
    font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
    color: #233143;
}

#cuerpo.justificar .tzaloa-ai-header,
#cuerpo.justificar .ia-form-header {
    padding: 0;
}

#cuerpo.justificar .tzaloa-ai-header h2,
#cuerpo.justificar .ia-form-title {
    margin: 0;
    padding: 18px 24px;
    font-size: 18px;
    font-weight: 700;
    background: #0d47a1;
    color: #ffffff;
    letter-spacing: 0.3px;
    line-height: 1.35;
}

#cuerpo.justificar .tzaloa-ai-header p,
#cuerpo.justificar .ia-form-description {
    margin: 0;
    padding: 18px 24px 8px;
    color: #4a5568;
    font-size: 15px;
    line-height: 1.65;
}

#cuerpo.justificar .tzaloa-ai-help {
    margin: 0 24px 18px;
    padding: 12px 14px;
    background: #f5f7fa;
    border-left: 4px solid #8aa4bf;
    border-radius: 8px;
    color: #334155;
    font-size: 14px;
}

#cuerpo.justificar .tzaloa-ai-fields,
#cuerpo.justificar .ia-form-body {
    padding: 24px;
}

#cuerpo.justificar .tzaloa-ai-field {
    margin-bottom: 18px;
}

#cuerpo.justificar .tzaloa-ai-field:last-child {
    margin-bottom: 0;
}

#cuerpo.justificar .tzaloa-ai-field label,
body .ia-form label {
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 700;
    color: #22324a;
}

#cuerpo.justificar .tzaloa-ai-field textarea,
body .ia-form textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 14px;
    border: 1px solid #c7d2de;
    border-radius: 12px;
    background: #fbfcfd;
    color: #26364a;
    resize: vertical;
    font-size: 15px;
    line-height: 1.55;
    min-height: 110px;
}

#cuerpo.justificar .tzaloa-ai-field textarea:focus,
body .ia-form textarea:focus {
    outline: none;
    border-color: #7f9bb8;
    box-shadow: 0 0 0 3px rgba(127, 155, 184, 0.18);
}

#cuerpo.justificar .tzaloa-ai-actions {
    padding: 0 24px 24px;
    margin-top: 4px;
}

#cuerpo.justificar .tzaloa-ai-submit,
body .ia-form .tzaloa-ai-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 22px;
    border: none;
    border-radius: 12px;
    background: #1f4b7a;
    color: #ffffff;
    font-size: 15px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 6px 16px rgba(17, 34, 68, 0.16);
    transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

#cuerpo.justificar .tzaloa-ai-submit:hover,
body .ia-form .tzaloa-ai-submit:hover {
    background: #173a60;
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(17, 34, 68, 0.2);
}

#cuerpo.justificar .tzaloa-ai-submit:active,
body .ia-form .tzaloa-ai-submit:active {
    transform: translateY(0);
}

#cuerpo.justificar .tzaloa-ai-submit[disabled],
body .ia-form .tzaloa-ai-submit[disabled] {
    opacity: 0.6;
    cursor: not-allowed;
    box-shadow: none;
}

#cuerpo.justificar .elegant-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-family: system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 24px rgba(0, 0, 0, .08);
}

#cuerpo.justificar .elegant-table th,
#cuerpo.justificar .elegant-table td {
    padding: 14px 16px;
    border-bottom: 1px solid #e5e7eb;
    vertical-align: top;
}

#cuerpo.justificar .elegant-table th {
    background: #111827;
    color: #ffffff;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    font-size: 13px;
    border-bottom: 1px solid rgba(255,255,255,.12);
    text-shadow: 0 1px 0 rgba(0,0,0,.35);
}

#cuerpo.justificar .elegant-table tr:last-child td {
    border-bottom: none;
}

@media (max-width: 767px) {
    #cuerpo.justificar .tzaloa-ai-exercise,
    #cuerpo.justificar .ia-form {
        margin: 18px auto;
        border-radius: 14px;
    }

    #cuerpo.justificar .tzaloa-ai-header h2,
    #cuerpo.justificar .ia-form-title {
        font-size: 17px;
        padding: 16px 18px;
    }

    #cuerpo.justificar .tzaloa-ai-header p,
    #cuerpo.justificar .ia-form-description,
    #cuerpo.justificar .tzaloa-ai-fields,
    #cuerpo.justificar .ia-form-body,
    #cuerpo.justificar .tzaloa-ai-actions {
        padding-left: 18px;
        padding-right: 18px;
    }
}
