/*
 * Texaco Valeriano — Formulario de Vacantes
 * assets/form.css
 */

/* ---- Wrap general ---- */
.tv-job-form-wrap {
    max-width: 780px;
    margin: 0 auto;
}

/* ---- Mensajes ---- */
.tv-form-msg {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 18px 22px;
    border-radius: 10px;
    margin-bottom: 24px;
    font-size: .97rem;
    line-height: 1.55;
}
.tv-form-msg--success {
    background: #e8f5e9;
    color: #2e7d32;
    border-left: 4px solid #4caf50;
}
.tv-form-msg--error {
    background: #fff3e0;
    color: #bf360c;
    border-left: 4px solid #ff7043;
}
.tv-form-msg--loading {
    background: #eef5ff;
    color: #0a4f88;
    border-left: 4px solid #2f80ed;
}
.tv-form-msg--warning {
    background: #fff8e1;
    color: #8a5a00;
    border-left: 4px solid #f7b500;
}
.tv-form-msg__icon { font-size: 1.4rem; flex-shrink: 0; }

.tv-job-form-wrap.is-submitting .tv-job-form {
    opacity: .72;
    pointer-events: none;
}

/* ---- Secciones ---- */
.tv-job-form__section {
    background: #fff;
    border: 1px solid #ebebeb;
    border-radius: 14px;
    padding: 32px 28px;
    margin-bottom: 20px;
}
.tv-job-form__section-title {
    font-family: "Oswald", "Arial Narrow", Arial, sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: #0a1628;
    letter-spacing: .04em;
    text-transform: uppercase;
    margin-bottom: 22px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.tv-job-form__section-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: #d42027;
    color: #fff;
    font-size: .78rem;
    font-weight: 700;
    border-radius: 50%;
    flex-shrink: 0;
}

/* ---- Cards de puestos ---- */
.tv-job-form__puestos {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(136px, 1fr));
    gap: 12px;
    margin-bottom: 6px;
}
.tv-puesto-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 8px;
    padding: 18px 14px;
    border: 2px solid #ebebeb;
    border-radius: 12px;
    cursor: pointer;
    transition: all .22s ease;
    position: relative;
    background: #fafafa;
}
.tv-puesto-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}
.tv-puesto-card__icon {
    font-size: 2rem;
    line-height: 1;
}
.tv-puesto-card__name {
    font-family: "Oswald", Arial, sans-serif;
    font-size: .9rem;
    font-weight: 700;
    color: #0a1628;
    letter-spacing: .03em;
    text-transform: uppercase;
}
.tv-puesto-card__desc {
    font-size: .78rem;
    color: #9a9a9a;
    line-height: 1.4;
}
.tv-puesto-card:hover,
.tv-puesto-card:has(input:checked),
.tv-puesto-card.is-selected {
    border-color: #d42027;
    background: #fff5f5;
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(212,32,39,.15);
}
.tv-puesto-card:has(input:checked) .tv-puesto-card__name { color: #d42027; }

/* ---- Campos del formulario ---- */
.tv-job-form__row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}
.tv-job-form__field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 16px;
}
.tv-job-form__field:last-child { margin-bottom: 0; }
.tv-job-form__label {
    font-family: "Oswald", Arial, sans-serif;
    font-size: .82rem;
    font-weight: 600;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: #0a1628;
}
.tv-job-form__label .req { color: #d42027; margin-left: 2px; }

.tv-job-form input[type="text"],
.tv-job-form input[type="email"],
.tv-job-form input[type="tel"],
.tv-job-form textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid #ebebeb;
    border-radius: 8px;
    font-size: .97rem;
    font-family: inherit;
    color: #3a3a3a;
    background: #fff;
    transition: border-color .2s, box-shadow .2s;
    outline: none;
    appearance: none;
}
.tv-job-form input[type="file"] {
    width: 100%;
    padding: 14px 16px;
    border: 2px dashed #ddd;
    border-radius: 10px;
    font-size: .94rem;
    color: #3a3a3a;
    background: #fafafa;
    cursor: pointer;
}
.tv-job-form input[type="file"]:focus {
    border-color: #d42027;
    box-shadow: 0 0 0 3px rgba(212,32,39,.1);
    outline: none;
}
.tv-job-form input:focus,
.tv-job-form textarea:focus {
    border-color: #d42027;
    box-shadow: 0 0 0 3px rgba(212,32,39,.1);
}
.tv-job-form input.has-error,
.tv-job-form textarea.has-error {
    border-color: #e53935;
    box-shadow: 0 0 0 3px rgba(229,57,53,.1);
}
.tv-job-form textarea { min-height: 110px; resize: vertical; }

/* ---- Zona de carga de archivo ---- */
.tv-file-drop {
    border: 2px dashed #ddd;
    border-radius: 10px;
    padding: 28px 20px;
    text-align: center;
    cursor: pointer;
    transition: all .22s ease;
    background: #fafafa;
    position: relative;
}
.tv-file-drop input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
    z-index: 2;
}
.tv-file-drop:hover,
.tv-file-drop.is-dragover {
    border-color: #d42027;
    background: #fff5f5;
}
.tv-file-drop__inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    pointer-events: none;
}
.tv-file-drop__icon { font-size: 2.2rem; }
.tv-file-drop__text { font-size: .95rem; color: #3a3a3a; }
.tv-file-drop__hint { font-size: .82rem; color: #9a9a9a; }

.tv-file-drop__preview {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 4px 0;
}
.tv-file-drop__preview-name {
    font-size: .9rem;
    color: #0a1628;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.tv-file-drop__remove {
    background: none;
    border: none;
    font-size: 1rem;
    color: #d42027;
    cursor: pointer;
    flex-shrink: 0;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background .18s;
}
.tv-file-drop__remove:hover { background: #fde8e8; }

/* ---- Footer del form ---- */
.tv-job-form__footer {
    background: #fff;
    border: 1px solid #ebebeb;
    border-radius: 14px;
    padding: 28px 28px;
}
.tv-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    font-size: .93rem;
    color: #3a3a3a;
    line-height: 1.5;
    margin-bottom: 20px;
}
.tv-checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    flex-shrink: 0;
    accent-color: #d42027;
    cursor: pointer;
}
.tv-checkbox-label a { color: #d42027; }

.tv-job-form__submit {
    width: 100%;
    font-size: 1.05rem;
    padding: 16px 24px;
    cursor: pointer;
    border: none;
}
.tv-job-form__submit:disabled { opacity: .65; cursor: not-allowed; transform: none; }

/* ---- Errores de campo ---- */
.tv-field-error {
    font-size: .84rem;
    color: #e53935;
    min-height: 18px;
    line-height: 1.4;
}

/* ---- Contact Form 7 con estilo Texaco Valeriano ---- */
.tv-job-cf7-wrap .wpcf7 {
    width: 100%;
}
.tv-job-cf7-wrap .wpcf7-form {
    margin: 0;
}
.tv-job-form--cf7 .wpcf7-form-control-wrap {
    display: block;
    width: 100%;
}
.tv-job-form--cf7 .wpcf7-radio.tv-cf7-puestos {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(136px, 1fr));
    gap: 12px;
    margin-bottom: 6px;
}
.tv-job-form--cf7 .wpcf7-radio.tv-cf7-puestos .wpcf7-list-item {
    display: block;
    margin: 0;
}
.tv-job-form--cf7 .wpcf7-radio.tv-cf7-puestos label {
    min-height: 116px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 8px;
    padding: 18px 14px;
    border: 2px solid #ebebeb;
    border-radius: 12px;
    cursor: pointer;
    transition: all .22s ease;
    position: relative;
    background: #fafafa;
}
.tv-job-form--cf7 .wpcf7-radio.tv-cf7-puestos input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}
.tv-job-form--cf7 .wpcf7-radio.tv-cf7-puestos .wpcf7-list-item-label {
    font-family: "Oswald", Arial, sans-serif;
    font-size: 1rem;
    font-weight: 700;
    color: #0a1628;
    letter-spacing: .03em;
    text-transform: uppercase;
    line-height: 1.35;
}
.tv-job-form--cf7 .wpcf7-radio.tv-cf7-puestos label:hover,
.tv-job-form--cf7 .wpcf7-radio.tv-cf7-puestos label:has(input:checked),
.tv-job-form--cf7 .wpcf7-radio.tv-cf7-puestos label.is-selected {
    border-color: #d42027;
    background: #fff5f5;
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(212,32,39,.15);
}
.tv-job-form--cf7 .wpcf7-radio.tv-cf7-puestos label:has(input:checked) .wpcf7-list-item-label,
.tv-job-form--cf7 .wpcf7-radio.tv-cf7-puestos label.is-selected .wpcf7-list-item-label {
    color: #d42027;
}
.tv-job-form--cf7 .wpcf7-acceptance .wpcf7-list-item {
    margin: 0;
}
.tv-job-form--cf7 .wpcf7-acceptance label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    font-size: .93rem;
    color: #3a3a3a;
    line-height: 1.5;
    margin-bottom: 20px;
}
.tv-job-form--cf7 .wpcf7-acceptance input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    flex-shrink: 0;
    accent-color: #d42027;
}
.tv-job-cf7-wrap .wpcf7-spinner {
    margin: 12px auto 0;
    display: block;
}
.tv-job-cf7-wrap .wpcf7-not-valid-tip {
    color: #e53935;
    font-size: .84rem;
    margin-top: 6px;
}
.tv-job-form--cf7 .wpcf7-not-valid {
    border-color: #e53935 !important;
    box-shadow: 0 0 0 3px rgba(229,57,53,.1) !important;
}
.tv-job-cf7-wrap .wpcf7 form .wpcf7-response-output {
    border: 0;
    border-left: 4px solid #ff7043;
    border-radius: 10px;
    background: #fff3e0;
    color: #bf360c;
    margin: 18px 0 0;
    padding: 16px 20px;
    line-height: 1.5;
}
.tv-job-cf7-wrap .wpcf7 form.sent .wpcf7-response-output {
    background: #e8f5e9;
    color: #2e7d32;
    border-left-color: #4caf50;
}

/* ---- Responsive ---- */
@media (max-width: 600px) {
    .tv-job-form__section { padding: 22px 16px; }
    .tv-job-form__row { grid-template-columns: 1fr; }
    .tv-job-form__puestos { grid-template-columns: 1fr 1fr; }
    .tv-job-form--cf7 .wpcf7-radio.tv-cf7-puestos { grid-template-columns: 1fr 1fr; }
    .tv-job-form__footer { padding: 20px 16px; }
}
