/* ═══════════════════════════════════════════════════════════════
   Blue Ark Solutions — Forms Frontend CSS
   Versión: 1.0.0
   ═══════════════════════════════════════════════════════════════ */

.bas-form-wrap {
    max-width: 600px;
    width: 100%;
    font-family: inherit;
}

/* ─── Grupos de campo ────────────────────────────────────────── */
.bas-field-group {
    margin-bottom: 16px;
}
.bas-field-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    font-size: 14px;
    color: #333;
}
.bas-required {
    color: #dc3545;
    margin-left: 2px;
}

/* ─── Campos de entrada ──────────────────────────────────────── */
.bas-field {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #ced4da;
    border-radius: 5px;
    font-size: 14px;
    font-family: inherit;
    background: #fff;
    color: #333;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
    -webkit-appearance: none;
}
.bas-field:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.12);
}
.bas-field::placeholder {
    color: #aaa;
}

textarea.bas-field {
    resize: vertical;
    min-height: 100px;
}

select.bas-field {
    cursor: pointer;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path d='M1 1l5 5 5-5' stroke='%23666' stroke-width='2' fill='none'/></svg>");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

/* ─── Radio y Checkbox ───────────────────────────────────────── */
.bas-radio-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.bas-radio-group label,
.bas-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: normal;
    cursor: pointer;
    font-size: 14px;
}
.bas-radio-group input[type="radio"],
.bas-checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    flex-shrink: 0;
}

/* ─── Botón de envío ─────────────────────────────────────────── */
.bas-submit-btn {
    display: inline-block;
    padding: 12px 28px;
    background: #0073aa;
    color: #fff;
    border: none;
    border-radius: 5px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.1s ease;
    font-family: inherit;
    margin-top: 4px;
}
.bas-submit-btn:hover {
    background: #005a87;
}
.bas-submit-btn:active {
    transform: scale(0.98);
}
.bas-submit-btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

/* ─── Mensajes de estado ─────────────────────────────────────── */
.bas-form-messages {
    margin: 12px 0;
    font-size: 14px;
}
.bas-form-messages.success {
    background: #d4edda;
    color: #155724;
    padding: 12px 16px;
    border-radius: 6px;
    border-left: 4px solid #28a745;
}
.bas-form-messages.error {
    background: #f8d7da;
    color: #721c24;
    padding: 12px 16px;
    border-radius: 6px;
    border-left: 4px solid #dc3545;
}

/* ─── Error de validación ────────────────────────────────────── */
.bas-field-error {
    color: #dc3545;
    font-size: 12px;
    margin-top: 4px;
    display: none;
}
.bas-field-error.visible {
    display: block;
}
.bas-field.has-error {
    border-color: #dc3545;
}

/* ─── Responsive ─────────────────────────────────────────────── */
@media screen and (max-width: 480px) {
    .bas-field,
    .bas-submit-btn {
        font-size: 16px; /* evita zoom automático en iOS */
    }
}
