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

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

/* ── 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); /* 1.75rem */
    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); /* 0.95rem */
    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); /* 0.9rem */
    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); /* 0.72rem */
    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; /* offset to align with circle centres */
    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: #2563eb;
    border-color: #2563eb;
    color: #fff;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15);
}

.rekry-step-item.active .rekry-step-label {
    color: #2563eb;
    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); /* 1rem */
    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); /* 0.875rem */
    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); /* 0.95rem */
    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: #2563eb;
    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); /* 0.875rem */
    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: #2563eb;
    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); /* 0.95rem */
    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: #2563eb;
    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;
    }
}
