/* ============================================
   RSUNION® — Empleos / Postulaciones
   Mismo design system que rsunion.com
   ============================================ */

@font-face {
    font-family: 'PolySans';
    src: url('/assets/fonts/POLYSANS/PolySans-Median.otf') format('opentype');
    font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
    font-family: 'PolySans';
    src: url('/assets/fonts/POLYSANS/PolySans-Neutral.otf') format('opentype');
    font-weight: 400; font-style: normal; font-display: swap;
}

:root {
    --bg-primary: #0A0A0A;
    --bg-elevated: #111111;
    --bg-field: #161616;
    --text-primary: #FFFFFF;
    --text-secondary: #A3A3A3;
    --text-muted: #6B6B6B;
    --border: rgba(255, 255, 255, 0.10);
    --border-strong: rgba(255, 255, 255, 0.24);
    --accent: #FFFFFF;
    --accent-contrast: #0A0A0A;
    --danger: #ff5c5c;
    --radius: 14px;
    --font-display: 'PolySans', 'Space Grotesk', system-ui, sans-serif;
    --font-head: 'Space Grotesk', system-ui, sans-serif;
    --font-body: 'Inter', system-ui, -apple-system, sans-serif;
    --font-mono: 'JetBrains Mono', ui-monospace, monospace;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0; min-height: 100vh;
    background: var(--bg-primary); color: var(--text-primary);
    font-family: var(--font-body); font-size: 16px; line-height: 1.6;
    -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
    padding: 48px 20px 64px;
}

.bg-grid {
    position: fixed; inset: 0; z-index: 0; pointer-events: none;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.028) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.028) 1px, transparent 1px);
    background-size: 46px 46px;
    mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 40%, transparent 100%);
    -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 40%, transparent 100%);
}

.container { position: relative; z-index: 1; max-width: 720px; margin: 0 auto; }

.brand { display: flex; justify-content: center; margin-bottom: 40px; }
.brand__logo { height: 26px; width: auto; filter: invert(1) brightness(2); }

.eyebrow {
    font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.08em;
    text-transform: uppercase; color: var(--text-muted); margin: 0 0 14px;
}
h1 {
    font-family: var(--font-display); font-weight: 600;
    font-size: clamp(1.9rem, 5vw, 2.7rem); line-height: 1.05;
    letter-spacing: -0.02em; margin: 0 0 16px;
}
/* Ubicación / modalidad de la vacante (vacantes.meta_info) — mismo texto que
   se ve en la tarjeta de /vacantes.html, aquí bajo el título del puesto. */
.job-meta {
    font-family: var(--font-mono); font-size: 0.76rem; letter-spacing: 0.06em;
    text-transform: uppercase; color: var(--text-secondary);
    margin: 0 0 16px;
}

.description { color: var(--text-secondary); font-size: 1.02rem; margin: 0 0 40px; max-width: 56ch; }

/* Descripción completa del puesto (opcional, viene de vacantes.descripcion) */
.job-description {
    background: var(--bg-elevated); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 24px 26px; margin: 0 0 40px;
}
.job-description h2 {
    font-family: var(--font-head); font-weight: 600; font-size: 1.05rem;
    margin: 0 0 14px; color: var(--text-primary);
}
.job-description__body { color: var(--text-secondary); font-size: 0.96rem; line-height: 1.7; }
.job-description__body p { margin: 0 0 14px; }
.job-description__body p:last-child { margin-bottom: 0; }
.job-description__body ul { margin: 0 0 14px; padding-left: 20px; }
.job-description__body ul:last-child { margin-bottom: 0; }
.job-description__body li { margin-bottom: 6px; }

.form-group { margin-bottom: 26px; }
.form-group > label {
    display: block; font-family: var(--font-head); font-weight: 500;
    font-size: 0.96rem; color: var(--text-primary); margin-bottom: 10px;
}
.hint { display: block; font-weight: 400; font-size: 0.84rem; color: var(--text-muted); margin-top: -4px; margin-bottom: 10px; }

input[type="text"], input[type="email"], input[type="tel"], input[type="url"], textarea {
    width: 100%; background: var(--bg-field); border: 1px solid var(--border);
    border-radius: var(--radius); color: var(--text-primary); font-family: var(--font-body);
    font-size: 1rem; padding: 14px 16px;
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
    -webkit-appearance: none; appearance: none;
}
input::placeholder, textarea::placeholder { color: var(--text-muted); }
input:focus, textarea:focus {
    outline: none; border-color: var(--border-strong); background: #1b1b1b;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.06);
}

/* Subida de archivo (CV) */
.file-field {
    display: flex; align-items: center; gap: 14px;
    background: var(--bg-field); border: 1px dashed var(--border-strong);
    border-radius: var(--radius); padding: 16px; cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease;
}
.file-field:hover { background: #1b1b1b; border-color: rgba(255,255,255,0.4); }
.file-field input[type="file"] { display: none; }
.file-field__btn {
    flex: none; font-family: var(--font-head); font-weight: 600; font-size: 0.9rem;
    background: var(--accent); color: var(--accent-contrast);
    padding: 9px 16px; border-radius: 999px;
}
.file-field__name { color: var(--text-secondary); font-size: 0.92rem; word-break: break-all; }

/* Opciones tipo chip (radios) */
.radio-group { display: flex; flex-wrap: wrap; gap: 10px; }
.radio-group input[type="radio"] { position: absolute; opacity: 0; width: 0; height: 0; }
.radio-group label {
    display: inline-flex; align-items: center; padding: 11px 18px;
    background: var(--bg-field); border: 1px solid var(--border); border-radius: 999px;
    font-size: 0.94rem; color: var(--text-secondary); cursor: pointer;
    transition: all 0.18s ease; user-select: none;
}
.radio-group label:hover { border-color: var(--border-strong); color: var(--text-primary); }
.radio-group input[type="radio"]:checked + label {
    background: var(--accent); border-color: var(--accent); color: var(--accent-contrast); font-weight: 500;
}

button[type="submit"] {
    width: 100%; margin-top: 12px; padding: 16px 24px;
    background: var(--accent); color: var(--accent-contrast); border: none; border-radius: var(--radius);
    font-family: var(--font-head); font-weight: 600; font-size: 1.02rem; letter-spacing: 0.01em;
    cursor: pointer; transition: transform 0.15s ease, opacity 0.2s ease;
}
button[type="submit"]:hover { opacity: 0.9; }
button[type="submit"]:active { transform: translateY(1px); }
button[type="submit"]:disabled { opacity: 0.55; cursor: default; }

.text-danger { display: block; color: var(--danger); font-size: 0.82rem; margin-top: 7px; }
input.is-invalid, textarea.is-invalid { border-color: var(--danger); }

.foot {
    margin-top: 48px; padding-top: 26px; border-top: 1px solid var(--border);
    font-family: var(--font-mono); font-size: 0.78rem; color: var(--text-muted); text-align: center;
}
.notice { color: var(--text-secondary); background: var(--bg-elevated); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }

/* SweetAlert — diálogo dark + botón "Aceptar" legible (blanco con texto negro) */
.swal2-popup { border-radius: 16px !important; }
.swal2-styled.swal2-confirm {
    background: #ffffff !important;
    color: #0a0a0a !important;
    font-family: var(--font-head);
    font-weight: 600;
    border-radius: 10px !important;
}
.swal2-styled.swal2-confirm:focus { box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.22) !important; }

@media (max-width: 560px) {
    body { padding: 32px 16px 48px; }
    .radio-group label { padding: 10px 15px; font-size: 0.9rem; }
}
