/* ============================================================
   Duell Rekry – Application form styles
   ============================================================ */

:root {
    --rekry-font-size-base: 1.9rem;
}

.duell-avoimet-paikat {
    display: flex;
    width: 100%;
    justify-content: center;
    align-items: center;
}

.duell-avoimet-paikat__list {
    display: flex;
    list-style: none;
    max-width: 1100px;
    flex-wrap: wrap;
    margin-bottom: 3em;
}

.rekry-texts {
    display: flex;
    justify-content: center;
    flex-direction: column;
    align-items: center;
    margin: 1em;
    margin-top: 3em;
    margin-bottom: 2em;
}

.rekry-texts p {
    font-family: "Google Sans", sans-serif;
    font-weight: 400;
    font-size: 17px;
    line-height: 37px;
    text-align: center;
    max-width: 700px;
    margin-top: 0;
}

.rekry.container {
    max-width: 750px;
}
.rekry.container > p.wp-block-paragraph {
    font-family: "Google Sans", sans-serif;
    font-size: 17px;
    font-weight: 400;
    line-height: 1.5;
    color: #636669;
}

.rekry.container h2.wp-block-heading {
    font-family: "Google Sans", sans-serif;
    font-weight: 600;
    font-size: 28px;
    text-align: left;
    line-height: 1;
    color: #008054;
    margin-top: 2em;
    margin-bottom: 0.4em;
}

.rekry.container a {
    color: #008054;
}

.rekry-texts h2 {
    font-family: "Google Sans", sans-serif;
    font-weight: 700;
    font-size: 40px;
    text-align: center;
    line-height: 1;
    color: #008054;
}

@media (min-width: 800px) {
    body .rekry-texts p {
        font-size: 23px;
    }

    body .rekry-texts h2 {
        font-size: 62px;

    }
}

.duell-avoimet-paikat__list {
    padding: 0;
    margin: .5em;
    width: 100%;
    box-sizing: border-box;
}

.duell-avoimet-paikat__list li {
    width: 100%;
    margin: .5em;
    padding: 1.80em;
    border-radius: 10px;
    border: 1.1px solid #E6ECEA;
    box-sizing: border-box;
    background: #F7F9F8;
}

.duell-avoimet-paikat__body {
    width: 100%;
    box-sizing: border-box;
}

@media (min-width: 600px) {
    .duell-avoimet-paikat__list li {
        width: calc(50% - 1em);
    }
}

@media (min-width: 800px) {
    .duell-avoimet-paikat__list li {
        width: calc(33.33% - 1em);
    }
}

/* Yrityksen logo työpaikkakortissa */
.duell-avoimet-paikat__header {
    display: flex;
    justify-content: flex-end;
    margin-bottom: .75rem;
}

.duell-avoimet-paikat__company-logo {
    width: 70px;
    height: auto;
    object-fit: contain;
    margin-top: -8px;
}

.duell-avoimet-paikat__list h3 {
    font-family: "Google Sans", sans-serif;
    font-weight: 700;
    margin-top: 0;
    text-align: left;
    font-size: 1.8em;
    color: #171927 !important;
    margin-bottom: 0.25;
}

p.place {
    width: 100%;
    text-align: left;
    font-family: "Google Sans", sans-serif;
    font-weight: 600;
    font-size: 0.9em;
    color: #5f6368;
}

.duell-avoimet-paikat__list h3 a {
    color: #171927 !important;
}

.duell-avoimet-paikat__list .duell-avoimet-paikat__excerpt{
    width: 100%;
    max-width: none;
    font-family: "Google Sans", sans-serif;
    font-size: .9em;
    font-weight: 400;
    line-height: 1.5;
    color: #5f6368;
}

.duell-avoimet-paikat__list .duell-avoimet-paikat__cta {
    font-family: "Google Sans", sans-serif;
    font-size: 1.6rem;
    font-weight: 500;
    color: #008054;
    text-decoration: none;
    transition: color .2s ease;
}
.duell-avoimet-paikat__list .duell-avoimet-paikat__cta:hover {
    color: #ffab0f !important;
}
.duell-avoimet-paikat__list li{
    transition: all .25s ease;
}

.duell-avoimet-paikat__list li:hover{
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(0,0,0,.08);
}

/* ── Wrapper ──────────────────────────────────────────────── */
.duell-rekry-form-wrap {
    max-width: 640px;
    margin: 0 auto;
    padding: 0 16px 48px;
    font-family: inherit;
    color: #1a1a1a;
}

.duell-rekry-form-wrap h2 {
    margin: 0 0 28px;
    font-size: calc(var(--rekry-font-size-base) * 1.458);
    font-weight: 700;
    text-align: center;
}

/* ── Status notices ───────────────────────────────────────── */
.duell-rekry-notice {
    padding: 14px 18px;
    border-radius: 6px;
    margin-bottom: 24px;
    font-size: calc(var(--rekry-font-size-base) * 0.792);
    line-height: 1.5;
}

.duell-rekry-success {
    background: #ecfdf5;
    border: 1px solid #6ee7b7;
    color: #065f46;
}

.duell-rekry-error {
    background: #fff1f2;
    border: 1px solid #fda4af;
    color: #9f1239;
}

/* ── Step indicator ───────────────────────────────────────── */
.rekry-steps-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin-bottom: 36px;
}

.rekry-step-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.rekry-step-number {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: calc(var(--rekry-font-size-base) * 0.75);
    font-weight: 700;
    border: 2px solid #d1d5db;
    background: #fff;
    color: #9ca3af;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
    position: relative;
    z-index: 1;
}

.rekry-step-label {
    font-size: calc(var(--rekry-font-size-base) * 0.6);
    font-weight: 500;
    color: #9ca3af;
    white-space: nowrap;
    transition: color 0.2s;
}

/* connector line between steps */
.rekry-step-connector {
    flex: 1;
    height: 2px;
    background: #e5e7eb;
    min-width: 24px;
    max-width: 64px;
    margin-bottom: 22px;
    transition: background 0.2s;
}

/* done step */
.rekry-step-item.done .rekry-step-number {
    background: #16a34a;
    border-color: #16a34a;
    color: #fff;
}

.rekry-step-item.done .rekry-step-label {
    color: #16a34a;
}

.rekry-step-connector.done {
    background: #16a34a;
}

/* active step */
.rekry-step-item.active .rekry-step-number {
    background: #008054;
    border-color: #008054;
    color: #fff;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15);
}

.rekry-step-item.active .rekry-step-label {
    color: #008054;
    font-weight: 700;
}

/* ── Fieldset ─────────────────────────────────────────────── */
.duell-rekry-form fieldset {
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 28px 28px 20px;
    margin: 0 0 24px;
    background: #fff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
}

.duell-rekry-form legend {
    font-size: calc(var(--rekry-font-size-base) * 0.833);
    font-weight: 700;
    color: #374151;
    padding: 0 8px;
}

/* ── Form rows ────────────────────────────────────────────── */
.duell-rekry-form p {
    margin: 0 0 18px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.duell-rekry-form p:last-of-type {
    margin-bottom: 0;
}

/* ── Labels ───────────────────────────────────────────────── */
.duell-rekry-form label {
    font-size: calc(var(--rekry-font-size-base) * 0.729);
    font-weight: 600;
    color: #374151;
    cursor: pointer;
}

/* Inline checkbox rows */
.duell-rekry-form label:has(input[type="checkbox"]) {
    flex-direction: row;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    color: #4b5563;
}

/* ── Text inputs, select, textarea ───────────────────────── */
.duell-rekry-form input[type="text"],
.duell-rekry-form input[type="email"],
.duell-rekry-form input[type="tel"],
.duell-rekry-form select,
.duell-rekry-form textarea {
    width: 100%;
    padding: 10px 13px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: calc(var(--rekry-font-size-base) * 0.792);
    font-family: inherit;
    color: #1a1a1a;
    background: #fafafa;
    transition: border-color 0.15s, box-shadow 0.15s;
    box-sizing: border-box;
    appearance: none;
    -webkit-appearance: none;
}

.duell-rekry-form select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%236b7280' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 13px center;
    padding-right: 36px;
    cursor: pointer;
}

.duell-rekry-form textarea {
    resize: vertical;
    min-height: 96px;
}

.duell-rekry-form input[type="text"]:focus,
.duell-rekry-form input[type="email"]:focus,
.duell-rekry-form input[type="tel"]:focus,
.duell-rekry-form select:focus,
.duell-rekry-form textarea:focus {
    outline: none;
    border-color: #008054;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
    background: #fff;
}

/* ── File input ───────────────────────────────────────────── */
.duell-rekry-form input[type="file"] {
    font-size: calc(var(--rekry-font-size-base) * 0.729);
    color: #374151;
    cursor: pointer;
}

#rekry-profiili-kuva-preview {
    display: none;
    max-width: 200px;
    max-height: 200px;
    margin-top: 10px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    object-fit: cover;
}

/* ── Checkbox ─────────────────────────────────────────────── */
.duell-rekry-form input[type="checkbox"] {
    width: 17px;
    height: 17px;
    accent-color: #008054;
    cursor: pointer;
    flex-shrink: 0;
}

/* ── Validation error highlight ──────────────────────────── */
.duell-rekry-form .rekry-field-error {
    border-color: #f87171 !important;
    box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.15) !important;
    background: #fff8f8 !important;
}

/* ── Step navigation buttons ──────────────────────────────── */
.rekry-step-nav {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #f3f4f6;
}

.rekry-step-nav button {
    padding: 11px 28px;
    border-radius: 6px;
    font-size: calc(var(--rekry-font-size-base) * 0.792);
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: background 0.15s, transform 0.1s, opacity 0.15s;
    font-family: inherit;
    line-height: 1.2;
}

.rekry-step-nav button:active {
    transform: scale(0.97);
}

.rekry-btn-prev {
    background: #f3f4f6;
    color: #374151;
    margin-right: auto;
}

.rekry-btn-prev:hover {
    background: #e5e7eb;
}

.rekry-btn-next {
    background: #008054;
    color: #fff;
}

.rekry-btn-next:hover {
    background: #1d4ed8;
}

.rekry-btn-submit {
    background: #16a34a;
    color: #fff;
}

.rekry-btn-submit:hover {
    background: #15803d;
}

.rekry-btn-submit:disabled,
.rekry-btn-next:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 480px) {
    .duell-rekry-form fieldset {
        padding: 20px 16px 16px;
    }

    .rekry-step-label {
        display: none;
    }

    .rekry-step-connector {
        min-width: 16px;
        max-width: 32px;
    }

    .rekry-step-nav {
        flex-wrap: wrap;
    }

    .rekry-btn-prev {
        order: 2;
        margin-right: 0;
    }

    .rekry-btn-next,
    .rekry-btn-submit {
        order: 1;
        flex: 1;
    }
}
@media (max-width: 599px) {
    .duell-avoimet-paikat__header {
        height: 40px;
        display: flex;
        justify-content: flex-end;
        align-items: flex-start;
        margin-bottom: .5rem;
    }

    .duell-avoimet-paikat__company-logo {
        width: 70px;
        margin-top: 0;
    }
}
@media (max-width: 599px) {
    .duell-avoimet-paikat__header {
        margin-bottom: -1.5rem;
    }
}
@media (max-width: 599px) {
    .duell-avoimet-paikat__list h3 {
        font-size: 3.1rem;
    }

    .duell-avoimet-paikat__list p.place {
        font-size: 1.75rem;
    }

    .duell-avoimet-paikat__list .duell-avoimet-paikat__excerpt {
        font-size: 1.55rem;
        line-height: 1.5;
    }

    .duell-avoimet-paikat__list .duell-avoimet-paikat__cta {
        font-size: 1.75rem;
    }
}
.rekry.container ul,
.rekry.container ol {
    font-family: "Google Sans", sans-serif;
    font-size: 17px;
    line-height: 1.4;
    color: #5F6368;
    margin-bottom: 1em;
}

.rekry.container li {
    margin-bottom: 0.4em;
}