/* ============================================================
   صفحه همکاری — multistep collaboration form
   Palette/radii mirror the theme: #E1FF00 accent, black/white
   buttons, #E4E4E4 / dark #3A3A3A borders, 13-30px radii.
   Dark mode follows the theme's html.dark class toggle.
   ============================================================ */

.fs-hamkari {
    --hk-bg-soft: #F9F9F9;
    --hk-bg-card: #F9FAFC;
    --hk-field: #ffffff;
    --hk-border: #E4E4E4;
    --hk-text: #000000;
    --hk-muted: #969696;
    --hk-muted2: #B3B3B3;
    --hk-accent: #E1FF00;
    --hk-btn-bg: #000000;
    --hk-btn-text: #ffffff;
    --hk-focus: #000000;
    --hk-icon-box: #F0F0F0;
    --hk-hero-bg: #F9F9F9;
    --hk-hero-text: #000000;
    display: block;
    padding-top: 60px;
    color: var(--hk-text);
}

html.dark .fs-hamkari {
    --hk-bg-soft: #1A1A1A;
    --hk-bg-card: #1A1A1A;
    --hk-field: #000000;
    --hk-border: #3A3A3A;
    --hk-text: #ffffff;
    --hk-muted: #AAAAAA;
    --hk-muted2: #AAAAAA;
    --hk-btn-bg: #ffffff;
    --hk-btn-text: #000000;
    --hk-focus: #ffffff;
    --hk-icon-box: #2D2D2D;
    --hk-hero-bg: #E1FF00;
    --hk-hero-text: #000000;
}

/* ---------- hero ---------- */
.fs-hk-hero {
    background: var(--hk-hero-bg);
    color: var(--hk-hero-text);
    border-radius: 30px;
    padding: 45px 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    position: relative;
    overflow: hidden;
    margin-bottom: 40px;
    transition: background .3s;
}

.fs-hk-hero h1 {
    font-size: 38px;
    font-weight: 800;
    margin: 0 0 6px;
}

.fs-hk-hero p {
    font-size: 13px;
    font-weight: 600;
    line-height: 2;
    max-width: 480px;
    margin: 0;
}

.fs-hk-hero-badge {
    background: #000;
    color: #E1FF00;
    border-radius: 14px;
    padding: 13px 22px;
    font-size: 14px;
    font-weight: 800;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    transition: opacity .2s;
}

.fs-hk-hero-badge:hover {
    opacity: .85;
}

.fs-hk-hero-badge svg {
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .fs-hk-hero {
        flex-direction: column;
        text-align: center;
        padding: 35px 25px;
    }

    .fs-hk-hero h1 {
        font-size: 28px;
    }
}

/* ---------- form card ---------- */
.fs-hk-card {
    background: var(--hk-bg-card);
    border-radius: 30px;
    padding: 40px;
    margin-bottom: 60px;
    transition: background .3s;
    scroll-margin-top: 40px;
}

@media (max-width: 768px) {
    .fs-hk-card {
        padding: 25px 18px;
    }
}

/* ---------- progress steps ---------- */
.fs-hk-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 38px;
}

.fs-hk-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    position: relative;
    z-index: 2;
}

.fs-hk-step-circle {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--hk-field);
    border: 2px solid var(--hk-border);
    color: var(--hk-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 800;
    transition: all .3s;
}

.fs-hk-step.active .fs-hk-step-circle {
    background: var(--hk-accent);
    border-color: var(--hk-accent);
    color: #000;
    box-shadow: 0 0 0 5px rgba(225, 255, 0, .25);
}

.fs-hk-step.done .fs-hk-step-circle {
    background: var(--hk-btn-bg);
    border-color: var(--hk-btn-bg);
    color: var(--hk-btn-text);
}

.fs-hk-step-label {
    font-size: 12px;
    font-weight: 700;
    color: var(--hk-muted);
}

.fs-hk-step.active .fs-hk-step-label,
.fs-hk-step.done .fs-hk-step-label {
    color: var(--hk-text);
}

.fs-hk-step-line {
    width: 90px;
    height: 2px;
    background: var(--hk-border);
    margin: 0 12px 26px;
    position: relative;
    overflow: hidden;
}

.fs-hk-step-line::after {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--hk-accent);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform .4s;
}

.fs-hk-step-line.filled::after {
    transform: scaleX(1);
}

@media (max-width: 600px) {
    .fs-hk-step-line {
        width: 34px;
        margin: 0 6px 26px;
    }

    .fs-hk-step-label {
        font-size: 10px;
    }
}

/* ---------- step panels ---------- */
.fs-hk-panel {
    display: none;
}

.fs-hk-panel.active {
    display: block;
    animation: fsHkFadeUp .35s ease;
}

@keyframes fsHkFadeUp {
    from {
        opacity: 0;
        transform: translateY(14px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

.fs-hk-panel.ltr,
.fs-hk-success.ltr {
    direction: ltr;
    text-align: left;
}

.fs-hk-success.ltr {
    text-align: center;
}

.fs-hk-title {
    font-size: 19px;
    font-weight: 700;
    margin-bottom: 4px;
}

.fs-hk-sub {
    font-size: 12px;
    font-weight: 600;
    color: var(--hk-muted2);
    margin-bottom: 24px;
}

/* ---------- type cards ---------- */
.fs-hk-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

@media (max-width: 700px) {
    .fs-hk-grid {
        grid-template-columns: 1fr;
    }
}

.fs-hk-type-card {
    background: var(--hk-field);
    border: 2px solid var(--hk-border);
    border-radius: 20px;
    padding: 18px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    cursor: pointer;
    transition: all .2s;
    user-select: none;
}

.fs-hk-type-card:hover {
    border-color: var(--hk-focus);
}

.fs-hk-type-card.selected {
    background: var(--hk-accent);
    border-color: var(--hk-accent);
}

.fs-hk-type-card.selected .fs-hk-type-name,
.fs-hk-type-card.selected .fs-hk-type-desc {
    color: #000;
}

.fs-hk-type-icon {
    width: 52px;
    height: 52px;
    border-radius: 15px;
    flex-shrink: 0;
    background: var(--hk-icon-box);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--hk-text);
    transition: all .2s;
}

.fs-hk-type-card.selected .fs-hk-type-icon {
    background: #000;
    color: #E1FF00;
}

.fs-hk-type-name {
    font-size: 14px;
    font-weight: 800;
    line-height: 1.9;
}

.fs-hk-type-desc {
    font-size: 11px;
    font-weight: 600;
    color: var(--hk-muted);
    line-height: 1.8;
    margin-top: 2px;
}

/* ---------- fields ---------- */
.fs-hk-fields {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.fs-hk-row2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

@media (max-width: 600px) {
    .fs-hk-row2 {
        grid-template-columns: 1fr;
    }
}

.fs-hk-field input[type=text],
.fs-hk-field input[type=url],
.fs-hk-field input[type=email],
.fs-hk-field select,
.fs-hk-field textarea {
    width: 100%;
    padding: 13px 16px;
    background: var(--hk-field);
    border: 1px solid var(--hk-border);
    border-radius: 13px;
    color: var(--hk-text);
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    outline: none;
    transition: border-color .2s;
    appearance: none;
    -webkit-appearance: none;
    box-sizing: border-box;
}

.fs-hk-field textarea {
    resize: none;
    line-height: 2;
}

.fs-hk-field input:focus,
.fs-hk-field select:focus,
.fs-hk-field textarea:focus {
    border-color: var(--hk-focus);
}

.fs-hk-field input::placeholder,
.fs-hk-field textarea::placeholder {
    color: var(--hk-muted);
    font-size: 12px;
    font-weight: 600;
}

.fs-hk-field select:invalid {
    color: var(--hk-muted);
    font-size: 13px;
}

.fs-hk-field select option {
    color: var(--hk-text);
    background: var(--hk-field);
}

.fs-hk-err {
    display: none;
    font-size: 12px;
    font-weight: 600;
    color: #EF4444;
    margin-top: 5px;
}

.fs-hk-field.has-err input,
.fs-hk-field.has-err select,
.fs-hk-field.has-err textarea,
.fs-hk-field.has-err .fs-hk-file {
    border-color: #EF4444;
}

.fs-hk-field.has-err .fs-hk-err,
.fs-hk-err.show {
    display: block;
}

.fs-hk-select {
    position: relative;
}

.fs-hk-select::after {
    content: '';
    position: absolute;
    inset-inline-end: 18px;
    top: 50%;
    width: 8px;
    height: 8px;
    border-left: 2px solid var(--hk-muted);
    border-bottom: 2px solid var(--hk-muted);
    transform: translateY(-70%) rotate(-45deg);
    pointer-events: none;
}

/* file upload — theme style */
.fs-hk-file {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border: 1px solid var(--hk-border);
    background: var(--hk-field);
    border-radius: 13px;
    cursor: pointer;
    padding-inline-start: 16px;
    overflow: hidden;
    transition: border-color .2s;
}

.fs-hk-file:hover {
    border-color: var(--hk-focus);
}

.fs-hk-fname {
    font-size: 12px;
    font-weight: 600;
    color: var(--hk-muted);
    padding: 14px 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fs-hk-fbtn {
    display: flex;
    align-items: center;
    gap: 6px;
    border-inline-start: 1px solid var(--hk-border);
    padding: 14px 18px;
    font-size: 12px;
    font-weight: 700;
    color: var(--hk-text);
    flex-shrink: 0;
}

/* notice strip (accent) */
.fs-hk-notice {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--hk-accent);
    border-radius: 16px;
    padding: 13px 18px;
    margin-bottom: 20px;
}

.fs-hk-notice span {
    font-size: 12.5px;
    font-weight: 700;
    color: #000;
    line-height: 2;
}

.fs-hk-notice svg {
    flex-shrink: 0;
}

/* summary box */
.fs-hk-summary {
    background: var(--hk-bg-soft);
    border: 1px solid var(--hk-border);
    border-radius: 20px;
    padding: 18px 22px;
    margin-bottom: 20px;
}

.fs-hk-s-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--hk-muted);
    margin-bottom: 10px;
}

.fs-hk-s-row {
    display: flex;
    gap: 8px;
    font-size: 13px;
    font-weight: 700;
    line-height: 2.2;
}

.fs-hk-s-row b {
    color: var(--hk-muted);
    font-weight: 600;
    flex-shrink: 0;
}

/* error alert */
.fs-hk-alert {
    display: none;
    padding: 14px 18px;
    border-radius: 13px;
    font-size: 13px;
    font-weight: 600;
    line-height: 2;
    margin-bottom: 20px;
    background: #FEE2E2;
    border: 1px solid #FCA5A5;
    color: #B91C1C;
}

html.dark .fs-hamkari .fs-hk-alert {
    background: #450A0A;
    border-color: #7F1D1D;
    color: #FECACA;
}

.fs-hk-alert.show {
    display: block;
}

/* ---------- nav buttons ---------- */
.fs-hk-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 30px;
    gap: 14px;
}

.fs-hk-btn {
    font-family: inherit;
    border: none;
    cursor: pointer;
    border-radius: 15px;
    padding: 15px 34px;
    font-size: 15px;
    font-weight: 700;
    transition: opacity .2s, background .2s, border-color .2s;
}

.fs-hk-btn-primary {
    background: var(--hk-btn-bg);
    color: var(--hk-btn-text);
}

.fs-hk-btn-primary:hover {
    opacity: .8;
}

.fs-hk-btn-ghost {
    background: transparent;
    color: var(--hk-text);
    border: 1px solid var(--hk-border);
}

.fs-hk-btn-ghost:hover {
    border-color: var(--hk-focus);
}

.fs-hk-btn:disabled {
    opacity: .4;
    cursor: not-allowed;
}

.fs-hk-loading-text {
    display: none;
}

.fs-hk-btn-primary.busy .fs-hk-submit-text {
    display: none;
}

.fs-hk-btn-primary.busy .fs-hk-loading-text {
    display: inline;
}

/* ---------- success ---------- */
.fs-hk-success {
    display: none;
    text-align: center;
    padding: 30px 0 10px;
    animation: fsHkFadeUp .4s ease;
}

.fs-hk-success.show {
    display: block;
}

.fs-hk-check {
    width: 86px;
    height: 86px;
    border-radius: 50%;
    background: var(--hk-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 22px;
}

.fs-hk-success h2 {
    font-size: 24px;
    font-weight: 800;
    margin: 0 0 10px;
}

.fs-hk-success p {
    font-size: 13px;
    font-weight: 600;
    color: var(--hk-muted);
    line-height: 2.2;
    max-width: 400px;
    margin: 0 auto 26px;
}

/* ---------- LTR (English) overrides — last so they win over FaNum ---------- */
.fs-hk-panel.ltr .fs-hk-title,
.fs-hk-panel.ltr .fs-hk-sub,
.fs-hk-panel.ltr input,
.fs-hk-panel.ltr select,
.fs-hk-panel.ltr textarea,
.fs-hk-panel.ltr .fs-hk-btn,
.fs-hk-panel.ltr .fs-hk-summary,
.fs-hk-panel.ltr .fs-hk-err,
.fs-hk-panel.ltr .fs-hk-alert,
.fs-hk-panel.ltr .fs-hk-file,
.fs-hk-success.ltr h2,
.fs-hk-success.ltr p,
.fs-hk-success.ltr .fs-hk-btn,
.fs-hk-type-card.en .fs-hk-type-name,
.fs-hk-type-card.en .fs-hk-type-desc,
.fs-hk-steps.ltr .fs-hk-step-label,
.fs-hk-steps.ltr .fs-hk-step-circle {
    font-family: 'Segoe UI', Tahoma, sans-serif;
}

.fs-hk-steps.ltr {
    direction: ltr;
}

.fs-hk-steps.ltr .fs-hk-step-line::after {
    transform-origin: left;
}
