/* ============================================================
   ErasmusTalent Embedded Forms – /public/embed/erasmus-forms.css
   ============================================================ */

/* ── Reset ── */
.et-form * { box-sizing: border-box; }

/* ── Layout ── */
.et-form .et-row {
    display: flex;
    flex-wrap: wrap;
    margin-right: -0.75rem;
    margin-left: -0.75rem;
    row-gap: 1rem;
}
.et-form .et-row > [class*="et-col"] {
    padding-right: 0.75rem;
    padding-left: 0.75rem;
    width: 100%;
}
.et-form .et-col-12  { flex: 0 0 auto; width: 100%; }
@media (min-width: 768px) {
    .et-form .et-col-md-4 { flex: 0 0 auto; width: 33.33333%; }
    .et-form .et-col-md-6 { flex: 0 0 auto; width: 50%; }
    .et-form .et-col-md-8 { flex: 0 0 auto; width: 66.66667%; }
}

/* ── Typografie ── */
.et-form {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 15px;
    color: #222;
    line-height: 1.5;
}
.et-form h2 {
    color: #1a2f5e;
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0 0 1.75rem;
    line-height: 1.25;
}

/* ── Taalswitch ── */
.et-lang {
    display: flex;
    gap: 0.4rem;
    margin-bottom: 1rem;
}
.et-lang button {
    padding: 0.2rem 0.6rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
    font-size: 0.8rem;
    color: #555;
    transition: background 0.15s, color 0.15s;
}
.et-lang button[aria-pressed="true"] {
    background: #1a2f5e;
    color: #fff;
    border-color: #1a2f5e;
}

/* ── Secties (visuele wizard-cards) ── */
.et-form .et-section {
    background: #f5f6f8;
    border-radius: 10px;
    padding: 1.25rem 1.5rem 1.5rem;
    /* overflow:hidden zodat border-radius klopt maar negatieve margins werken */
}
.et-form .et-section-title {
    font-size: 1rem;
    font-weight: 700;
    color: #1a2f5e;
}
/* et-section-body = et-row: compenseer de padding van de parent */
.et-form .et-section-body {
    background: transparent;
    margin-left: -0.75rem;
    margin-right: -0.75rem;
    /* Overschrijf de et-row margins die al -0.75rem zijn zodat er geen dubbeling is */
    /* De et-row class zet zelf ook -0.75rem, dus we resetten die hier */
}
/* Zorg dat kolom-selector ook matcht op gecombineerde classes zoals "et-col-md-6 et-field" */
.et-form .et-section-body > [class*="et-col"] {
    padding-right: 0.75rem;
    padding-left: 0.75rem;
    width: 100%;
}
@media (min-width: 768px) {
    .et-form .et-section-body > .et-col-md-4 { flex: 0 0 auto; width: 33.33333%; }
    .et-form .et-section-body > .et-col-md-6 { flex: 0 0 auto; width: 50%; }
    .et-form .et-section-body > .et-col-md-8 { flex: 0 0 auto; width: 66.66667%; }
    .et-form .et-section-body > .et-col-12   { flex: 0 0 auto; width: 100%; }
}

/* ── CV dropzone ── */
.et-form .et-cv-section {
    margin-bottom: 0;
}
.et-form .et-cv-dropzone {
    border: 2px dashed #ccc;
    border-radius: 10px;
    padding: 2rem 1.5rem;
    text-align: center;
    color: #666;
    font-size: 0.9rem;
    background: #fafafa;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
}
.et-form .et-cv-dropzone:hover,
.et-form .et-cv-dropzone.et-drag-over {
    border-color: #1a2f5e;
    background: #f0f3f9;
}
.et-form .et-cv-dropzone p {
    margin: 0 0 1rem;
}

/* ── Velden ── */
.et-form .et-field {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}
.et-form .et-field-label {
    font-size: 0.88rem;
    color: #333;
    font-weight: 500;
}
.et-form .et-field-hint {
    font-size: 0.82rem;
    color: #666;
    margin-bottom: 0.1rem;
}

/* ── Inputs / selects / textareas ── */
.et-form .et-control {
    width: 100%;
    padding: 0.6rem 0.8rem;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 0.95rem;
    color: #222;
    background: #fff;
    transition: border-color 0.15s, box-shadow 0.15s;
    outline: none;
    font-family: inherit;
}
.et-form .et-control:focus {
    border-color: #1a2f5e;
    box-shadow: 0 0 0 3px rgba(26, 47, 94, 0.12);
}
.et-form textarea.et-control {
    resize: vertical;
    min-height: 110px;
}
.et-form select.et-control { cursor: pointer; }
.et-form input[type="file"].et-control {
    padding: 0.4rem 0.6rem;
    cursor: pointer;
    background: #fff;
}

/* ── Validatie ── */
.et-form .et-error {
    display: none;
    font-size: 0.82rem;
    color: #c0392b;
    margin-top: 0.1rem;
}
.et-form .et-field--invalid .et-error { display: block; }
.et-form .et-field--invalid .et-control {
    border-color: #c0392b;
    box-shadow: 0 0 0 3px rgba(192, 57, 43, 0.1);
}

/* ── Alerts ── */
.et-alert {
    padding: 0.75rem 1rem;
    border-radius: 6px;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}
.et-alert--error   { background: #fdf0f0; border: 1px solid #e8b4b4; color: #c0392b; }
.et-alert--success { background: #edfaf3; border: 1px solid #a8dfc0; color: #1e7e4a; }
.et-cv-alert:empty { display: none; }

/* ── Primaire knop (oranje) ── */
.et-form .et-btn-primary,
.et-form .blue-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.65rem 1.5rem;
    background: #f47920;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
    font-family: inherit;
}
.et-form .et-btn-primary:hover,
.et-form .blue-btn:hover { background: #d9660f; }
.et-form .et-btn-primary:disabled { opacity: 0.6; cursor: not-allowed; }

/* Submit-rij */
.et-form .et-submit-row {
    padding-top: 0.5rem;
}

/* ── Login-switch ── */
.et-form .et-login-switch {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    background: #f5f6f8;
    border-radius: 10px;
    padding: 0.85rem 1.1rem;
    padding-bottom: 1.1rem;
    border-bottom: 1px solid #e4e2db;
}
.et-form .et-login-switch-main {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 200px;
}
.et-form .et-login-switch-icon {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #e9ecf3;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.et-form .et-login-switch-icon svg {
    width: 18px;
    height: 18px;
    stroke: #1a2f5e;
    fill: none;
}
.et-form .et-login-switch-text {
    min-width: 0;
}
.et-form .et-login-switch-title {
    font-size: 0.88rem;
    color: #333;
    font-weight: 500;
}
.et-form .et-login-switch-subtitle {
    font-size: 0.8rem;
    color: #777;
    margin-top: 0.1rem;
}
.et-form .et-login-switch-btn {
    background: #f47920;
    border: 1.5px solid #f47920;
    color: #fff;
    border-radius: 6px;
    padding: 0.4rem 0.9rem;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    font-family: inherit;
    flex-shrink: 0;
    transition: background 0.15s, border-color 0.15s;
}
.et-form .et-login-switch-btn:hover {
    background: #d9660f;
    border-color: #d9660f;
}

.et-form .et-login-switch-divider {
    height: 1px;
    background: #e4e2db;
    margin: 1.5rem 0;
}

/* ── Checkboxes ── */
.et-form .et-checkgroup {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    padding: 0.75rem 0;
}
.et-form .et-checkgroup .et-check { width: calc(50% - 0.75rem); }
@media (min-width: 768px) {
    .et-form .et-checkgroup .et-check { width: calc(33.33% - 1rem); }
}
.et-form .et-check {
    display: inline-flex;
    align-items: flex-start;
    gap: 0.45rem;
    font-size: 0.88rem;
    color: #1a2f5e;
    cursor: pointer;
    line-height: 1.4;
}
.et-form .et-check input[type="checkbox"] {
    margin-top: 0.15rem;
    flex-shrink: 0;
    width: 15px;
    height: 15px;
    accent-color: #1a2f5e;
    cursor: pointer;
}

/* ── Checkbox-groep accordion (skills toggle) ── */
.et-form .et-skills {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
}
.et-form .et-skills-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0.7rem 1rem;
    background: #fff;
    border: none;
    color: #333;
    font-size: 0.9rem;
    cursor: pointer;
    text-align: left;
    font-family: inherit;
}
.et-form .et-skills-toggle:hover { background: #f5f6f8; }
.et-form .et-skills-count { color: #555; }
.et-form .et-skills-arrow {
    font-size: 0.75rem;
    color: #888;
    transition: transform 0.2s;
    display: inline-block;
}
.et-form .et-skills-arrow.et-open { transform: rotate(90deg); }
.et-form .et-skills-panel {
    padding: 0.75rem 1rem;
    border-top: 1px solid #e0e0e0;
}
.et-form .et-skills-panel[hidden] { display: none; }
.et-form .et-skills-search { margin-bottom: 0.75rem; }
.et-form .et-skills-body { display: flex; flex-direction: column; }

/* ── Categorieën (accordions binnen checkbox-groep) ── */
.et-form .et-category {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 0.5rem;
    background: #fff;
}
.et-form .et-category-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.65rem 1rem;
    background: #f5f6f8;
    color: #1a2f5e;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    user-select: none;
}
.et-form .et-category-title::after {
    content: '+';
    font-size: 1.1rem;
    font-weight: 400;
    color: #1a2f5e;
}
.et-form .et-category.et-open .et-category-title::after { content: '−'; }
.et-form .et-category .et-checkgroup { padding: 0.75rem 1rem; }
.et-form .et-category .et-checkgroup[hidden] { display: none; }

/* ── Terms ── */
.et-form .et-terms-check { margin-top: 0.25rem; }
.et-form .et-terms-link {
    color: #1a2f5e;
    font-size: 0.85rem;
}

/* ── Honeypot ── */
.et-form .et-honeypot {
    position: absolute !important;
    width: 1px; height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

/* ── Busy state ── */
.et-form .et-busy { opacity: 0.6; pointer-events: none; }

/* ── PITA intro-card ── */
.et-form .et-pita-intro[hidden] { display: none; }
.et-form .et-pita-card {
    background: #f5f6f8;
    border-radius: 10px;
    padding: 1.25rem 1.5rem;
    font-size: 0.95rem;
    line-height: 1.6;
    color: #222;
}
.et-form .et-pita-card p {
    margin: 0 0 0.75rem;
}
.et-form .et-pita-card p:last-child {
    margin-bottom: 0;
}
.et-form .et-pita-greeting {
    font-size: 1rem;
}

/* ── Verborgen secties en submit ── */
.et-form .et-section[hidden],
.et-form .et-submit-row[hidden] { display: none; }

/* ── Sectie beschrijving (grijze card onder titel) ── */
.et-form .et-section-desc {
    background: #ebebed;
    border-radius: 8px;
    padding: 1rem 1.25rem;
    font-size: 0.9rem;
    color: #333;
    line-height: 1.6;
    margin-bottom: 1rem;
}

/* ── Checkbox-groep met categorieën (directe weergave) ── */
.et-form .et-checkgroup-cats {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* ── Profiel-card ── */
.et-form .et-profiel-card {
    background: #f5f6f8;
    border-radius: 10px;
    padding: 1.25rem 1.5rem;
}
.et-form .et-profiel-loading {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9rem;
    color: #555;
}
.et-form .et-profiel-loading[hidden],
.et-form .et-profiel-result[hidden] { display: none; }
.et-form .et-profiel-card[hidden] { display: none; }

/* Spinner */
.et-form .et-spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid #ddd;
    border-top-color: #f47920;
    border-radius: 50%;
    animation: et-spin 0.7s linear infinite;
    flex-shrink: 0;
}
@keyframes et-spin {
    to { transform: rotate(360deg); }
}

/* Profiel result */
.et-form .et-profiel-title {
    font-weight: 700;
    color: #f47920;
    font-size: 1rem;
    margin-bottom: 0.75rem;
}
.et-form .et-profiel-text {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #222;
    margin-bottom: 1rem;
}
.et-form .et-profiel-question {
    font-weight: 600;
    color: #1a2f5e;
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
}
.et-form .et-profiel-actions {
    display: flex;
    gap: 0.75rem;
}
.et-form .et-btn-yes {
    background: #27ae60;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 0.55rem 1.4rem;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.15s;
}
.et-form .et-btn-yes:hover { background: #219150; }
.et-form .et-btn-yes:disabled { opacity: 0.5; cursor: not-allowed; }
.et-form .et-btn-no {
    background: #e74c3c;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 0.55rem 1.4rem;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.15s;
}
.et-form .et-btn-no:hover { background: #c0392b; }
.et-form .et-btn-no:disabled { opacity: 0.5; cursor: not-allowed; }
.et-form .et-profiel-edit {
    margin-top: 1rem;
    width: 100%;
}
.et-form .et-profiel-edit[hidden] { display: none; }
.et-form .et-profiel-question[hidden],
.et-form .et-profiel-actions[hidden] { display: none; }

/* ── Profiel-samenvatting na submit ── */
.et-form .et-summary-card {
    background: #f5f6f8;
    border-radius: 10px;
    padding: 1.5rem 1.75rem;
    font-size: 0.95rem;
    line-height: 1.6;
    color: #222;
}
.et-form .et-summary-card h2 {
    font-size: 1.05rem;
    color: #f47920;
    margin: 1.25rem 0 0.5rem;
}
.et-form .et-summary-card h2:first-child {
    margin-top: 0;
}
.et-form .et-summary-card h3 {
    font-size: 0.95rem;
    color: #1a2f5e;
    margin: 1rem 0 0.4rem;
}
.et-form .et-summary-card p {
    margin: 0 0 0.75rem;
}
.et-form .et-summary-card ul {
    margin: 0 0 0.75rem;
    padding-left: 1.25rem;
}
.et-form .et-summary-card .block {
    margin-bottom: 1.25rem;
}
.et-form .et-summary-card .block:last-child {
    margin-bottom: 0;
}

.et-form .et-summary-cta {
    margin-top: 1.5rem;
    text-align: center;
}
.et-form .et-summary-cta .et-btn-primary {
    display: inline-block;
    text-decoration: none;
}

/* ── Tom Select overrides (multi-select velden) ── */
.et-form .ts-wrapper {
    font-family: inherit;
    font-size: 0.95rem;
}
.et-form .ts-wrapper.single .ts-control,
.et-form .ts-wrapper.multi .ts-control {
    border: 1px solid #ccc;
    border-radius: 6px;
    padding: 0.4rem 0.6rem;
    background: #fff;
    box-shadow: none;
}
.et-form .ts-wrapper.focus .ts-control {
    border-color: #1a2f5e;
    box-shadow: 0 0 0 3px rgba(26, 47, 94, 0.12);
}
.et-form .ts-control > .item {
    background: #1a2f5e;
    color: #fff;
    border-radius: 4px;
    padding: 0.15rem 0.5rem;
    font-size: 0.85rem;
}
.et-form .ts-control > .item .remove {
    border-left: 1px solid rgba(255,255,255,0.3);
    color: #fff;
}
.et-form .ts-dropdown {
    border: 1px solid #ccc;
    border-radius: 6px;
    font-family: inherit;
    font-size: 0.9rem;
}
.et-form .ts-dropdown .active {
    background: #f0f3f9;
    color: #1a2f5e;
}

/* ── Optgroups binnen Tom Select dropdown ── */
.et-form .ts-dropdown .optgroup-header {
    padding: 0.5rem 0.75rem 0.3rem;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #1a2f5e;
    background: #f5f6f8;
    border-top: 1px solid #e0e3ea;
    pointer-events: none;
    user-select: none;
}
.et-form .ts-dropdown .optgroup:first-child .optgroup-header {
    border-top: none;
}
.et-form .ts-dropdown .optgroup:not(:first-child) {
    margin-top: 0.25rem;
}
.et-form .ts-dropdown .optgroup .option {
    padding-left: 1.1rem;
}

/* ── Verplicht-badge naast het label ── */
.et-form .et-required-tag {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #f47920;
    background: #fdf0e4;
    border-radius: 4px;
    padding: 0.1rem 0.4rem;
    margin-left: 0.4rem;
    vertical-align: middle;
}

/* -- Terug knop per sectie -- */
.et-back-link {
    font-size: 0.75rem;
    color: #999;
    background: none;
    border: none;
    padding: 0;
    text-decoration: underline dotted;
    text-underline-offset: 2px;
    cursor: pointer;
    white-space: nowrap;
}

.et-back-link:hover {
    color: inherit;
    text-decoration-style: solid;
}
.et-form .et-section-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e0e3ea;
}

/* ── Vacatures-CTA: groter en opvallender dan standaard primary-knop ── */
.et-form .et-summary-cta .et-btn-vacancies {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2.25rem;
    font-size: 1.1rem;
    font-weight: 700;
    border-radius: 8px;
    background: #f47920;
    color: #fff;
    text-decoration: none;
    box-shadow: 0 4px 14px rgba(244, 121, 32, 0.35);
    transition: background 0.15s, transform 0.15s, box-shadow 0.15s;
}
.et-form .et-summary-cta .et-btn-vacancies:hover {
    background: #d9660f;
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(244, 121, 32, 0.45);
}

@media (max-width: 480px) {
    .et-form .et-summary-cta .et-btn-vacancies {
        width: 100%;
        justify-content: center;
    }
}

/* Dropdown optgroup collapsable */
.ts-dropdown .optgroup.et-collapsed [data-selectable] { display: none !important; }
.ts-dropdown .optgroup:not(.et-collapsed) [data-selectable] { display: block !important; }
.et-optgroup-header { cursor: pointer; user-select: none; pointer-events: auto; }

.et-optgroup-toggle {
    cursor: pointer;
    user-select: none;
    display: flex;
    align-items: center;
    gap: 6px;
}
.et-optgroup-arrow {
    display: inline-block;
    transition: transform .15s ease;
}
.et-optgroup-toggle.et-open .et-optgroup-arrow {
    transform: rotate(90deg);
}