/* ==========================================================================
   CamCBA - Bolsa de Trabajo Form Styles
   Colores corporativos: Primario #0F3D3A | Acento #D57F23
   ========================================================================== */

.camcba-bdt-wrapper {
    font-family: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #1E293B;
    width: 100%;
    margin: 0 auto;
    box-sizing: border-box;
}

.camcba-bdt-wrapper *,
.camcba-bdt-wrapper *::before,
.camcba-bdt-wrapper *::after {
    box-sizing: border-box;
}

/* --------------------------------------------------------------------------
   Hero Section
   -------------------------------------------------------------------------- */
.camcba-bdt-hero {
    background-color: #F4F7F5;
    padding: 60px 20px 50px 20px;
    text-align: center;
    border-radius: 12px;
    margin-bottom: 25px;
}

.camcba-bdt-title {
    font-size: 38px;
    font-weight: 700;
    color: #0F3D3A;
    margin: 0 0 15px 0;
    line-height: 1.2;
    letter-spacing: -0.5px;
}

.camcba-bdt-subtitle {
    max-width: 780px;
    margin: 0 auto;
    font-size: 17px;
    line-height: 1.6;
    color: #4A5568;
}

/* --------------------------------------------------------------------------
   Card Container
   -------------------------------------------------------------------------- */
.camcba-bdt-card {
    max-width: 880px;
    margin: 0 auto 50px auto;
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-radius: 16px;
    padding: 45px 40px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

@media (max-width: 768px) {
    .camcba-bdt-hero {
        padding: 40px 15px 35px 15px;
    }
    .camcba-bdt-title {
        font-size: 28px;
    }
    .camcba-bdt-subtitle {
        font-size: 15px;
    }
    .camcba-bdt-card {
        padding: 30px 20px;
        border-radius: 12px;
    }
}

/* --------------------------------------------------------------------------
   Grid Layout
   -------------------------------------------------------------------------- */
.camcba-form-grid {
    display: flex;
    flex-wrap: wrap;
    margin-left: -12px;
    margin-right: -12px;
    row-gap: 22px;
}

.camcba-form-group {
    padding-left: 12px;
    padding-right: 12px;
    display: flex;
    flex-direction: column;
}

.col-12 { width: 100%; }
.col-6  { width: 50%; }

@media (max-width: 768px) {
    .col-md-12 {
        width: 100% !important;
    }
}

/* --------------------------------------------------------------------------
   Labels & Inputs
   -------------------------------------------------------------------------- */
.camcba-label {
    font-size: 14.5px;
    font-weight: 600;
    color: #0F3D3A;
    margin-bottom: 7px;
    display: block;
}

.camcba-label .required {
    color: #DC2626;
    margin-left: 2px;
}

.camcba-label .optional {
    font-weight: 400;
    color: #64748B;
    font-size: 13px;
    margin-left: 4px;
}

.camcba-input,
.camcba-select {
    width: 100%;
    border: 1px solid #CBD5E1;
    border-radius: 8px;
    padding: 12px 14px;
    font-size: 15px;
    font-family: inherit;
    background-color: #FFFFFF;
    color: #1E293B;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    outline: none;
    line-height: 1.4;
}

.camcba-input:focus,
.camcba-select:focus {
    border-color: #D57F23;
    box-shadow: 0 0 0 3px rgba(213, 127, 35, 0.15);
}

.camcba-input::placeholder {
    color: #94A3B8;
}

.camcba-select {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23475569' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 16px 16px;
    padding-right: 40px;
    cursor: pointer;
}

/* --------------------------------------------------------------------------
   Radio Buttons
   -------------------------------------------------------------------------- */
.camcba-radio-group {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 24px;
    align-items: center;
    padding-top: 6px;
}

.camcba-radio-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
    color: #334155;
    margin: 0;
    user-select: none;
}

.camcba-radio-item input[type="radio"] {
    accent-color: #D57F23;
    width: 18px;
    height: 18px;
    margin: 0;
    cursor: pointer;
}

/* --------------------------------------------------------------------------
   File Upload Input
   -------------------------------------------------------------------------- */
.camcba-file-wrapper {
    position: relative;
    width: 100%;
}

.camcba-file-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 2;
}

.camcba-file-display {
    border: 1px dashed #CBD5E1;
    border-radius: 8px;
    padding: 12px 14px;
    background-color: #F8FAFC;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: #475569;
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

.camcba-file-input:hover + .camcba-file-display,
.camcba-file-input:focus + .camcba-file-display {
    border-color: #D57F23;
    background-color: #FFFBF5;
}

.camcba-file-display.has-file {
    border-color: #0F3D3A;
    background-color: #F0FDF4;
    color: #0F3D3A;
    font-weight: 500;
}

.camcba-file-display .file-icon {
    font-size: 18px;
    color: #D57F23;
}

/* --------------------------------------------------------------------------
   Validation Errors
   -------------------------------------------------------------------------- */
.camcba-field-error {
    font-size: 12.5px;
    color: #DC2626;
    margin-top: 5px;
    display: none;
}

.camcba-form-group.has-error .camcba-field-error {
    display: block;
}

.camcba-form-group.has-error .camcba-input,
.camcba-form-group.has-error .camcba-select {
    border-color: #DC2626;
    background-color: #FEF2F2;
}

.camcba-form-group.has-error .camcba-file-display {
    border-color: #DC2626;
    background-color: #FEF2F2;
}

/* --------------------------------------------------------------------------
   Submit Button
   -------------------------------------------------------------------------- */
.camcba-btn-submit {
    background-color: #D57F23;
    color: #FFFFFF;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
    padding: 16px 28px;
    width: 100%;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 14px rgba(213, 127, 35, 0.3);
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 10px;
}

.camcba-btn-submit:hover {
    background-color: #b86b1a;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(213, 127, 35, 0.4);
}

.camcba-btn-submit:active {
    transform: translateY(0);
}

.camcba-btn-submit:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Spinner Animation */
.camcba-btn-submit .spinner-icon {
    animation: rotate 2s linear infinite;
    width: 22px;
    height: 22px;
}

.camcba-btn-submit .spinner-icon .path {
    stroke: #FFFFFF;
    stroke-linecap: round;
    animation: dash 1.5s ease-in-out infinite;
}

@keyframes rotate {
    100% { transform: rotate(360deg); }
}

@keyframes dash {
    0% { stroke-dasharray: 1, 150; stroke-dashoffset: 0; }
    50% { stroke-dasharray: 90, 150; stroke-dashoffset: -35; }
    100% { stroke-dasharray: 90, 150; stroke-dashoffset: -124; }
}

/* --------------------------------------------------------------------------
   Response Alerts
   -------------------------------------------------------------------------- */
.camcba-form-alert {
    margin-top: 25px;
    padding: 18px 22px;
    border-radius: 10px;
    font-size: 15px;
    line-height: 1.5;
    text-align: center;
    animation: fadeIn 0.3s ease-in-out;
}

.camcba-form-alert.alert-success {
    background-color: #F0FDF4;
    border: 1px solid #86EFAC;
    color: #166534;
}

.camcba-form-alert.alert-error {
    background-color: #FEF2F2;
    border: 1px solid #FECACA;
    color: #991B1B;
}

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