/* ── Layout ──────────────────────────────────────────────────────────────── */

.form-exam {
    background: var(--wp--preset--color--dark);
    padding: 96px 0;
    min-height: 100vh;
}

.form-exam .fc-layout {
    display: flex;
    gap: 80px;
    align-items: flex-start;
}

.form-exam .fc-form-col {
    flex: 1 1 50%;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.form-exam .fc-sidebar {
    flex: 1 1 50%;
    min-width: 0;
    position: sticky;
    top: calc(var(--nav-height) + 24px);
}

/* ── Header ──────────────────────────────────────────────────────────────── */

.form-exam .fc-header {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-exam .fc-title {
    font-size: 32px;
    font-weight: 400;
    color: var(--wp--preset--color--white);
    margin: 0;
    line-height: 1;
}

.form-exam .fc-header-line {
    height: 1px;
    background: rgba(255, 255, 255, 0.2);
}

.form-exam .fc-desc {
    font-size: 16px;
    font-weight: 300;
    color: var(--wp--preset--color--neutral-100);
    line-height: 24px;
    margin: 0;
}

.form-exam .fc-course-name {
    font-size: 24px;
    font-weight: 300;
    color: var(--wp--preset--color--white);
    margin: 0;
    line-height: 1;
}

/* ── Section label ───────────────────────────────────────────────────────── */

.form-exam .fc-section-label-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 24px;
}

.form-exam .fc-section-label {
    font-size: 16px;
    font-weight: 300;
    color: var(--wp--preset--color--white);
    line-height: 24px;
}

.form-exam .fc-section-line {
    height: 1px;
    background: rgba(255, 255, 255, 0.2);
}

/* ── Fields ──────────────────────────────────────────────────────────────── */

.form-exam .fc-fields {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-exam .fc-input {
    width: 100%;
    height: 56px;
    background: var(--wp--preset--color--black);
    border: none;
    border-radius: 4px;
    padding: 0 24px;
    font-size: 14px;
    font-weight: 300;
    color: var(--wp--preset--color--white);
    line-height: 20px;
    box-sizing: border-box;
    outline: none;
    transition: box-shadow 0.15s, padding-top 0.15s ease, padding-bottom 0.15s ease;
    font-family: inherit;
    appearance: none;
    -webkit-appearance: none;
}

.form-exam .fc-input:focus,
.form-exam .fc-input:not(:placeholder-shown) {
    padding-top: 18px;
    padding-bottom: 0;
}

.form-exam .fc-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.form-exam .fc-input:focus {
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.3);
}

.form-exam .fc-input.fc-invalid {
    box-shadow: inset 0 0 0 1px #fc8181;
}

/* ── Select ──────────────────────────────────────────────────────────────── */

.form-exam .fc-select-wrap {
    position: relative;
    flex: 1;
    min-width: 0;
}

.form-exam .fc-select {
    width: 100%;
    height: 56px;
    background: var(--wp--preset--color--black);
    border: none;
    border-radius: 4px;
    padding: 0 48px 0 24px;
    font-size: 14px;
    font-weight: 300;
    color: var(--wp--preset--color--white);
    line-height: 20px;
    box-sizing: border-box;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    transition: box-shadow 0.15s, padding-top 0.15s ease, padding-bottom 0.15s ease;
    font-family: inherit;
}

.form-exam .fc-select-wrap.is-floated .fc-select {
    padding-top: 18px;
    padding-bottom: 0;
}

.form-exam .fc-select option {
    background: var(--wp--preset--color--black);
    color: var(--wp--preset--color--white);
}

.form-exam .fc-select option[value=""] {
    color: rgba(255, 255, 255, 0.5);
}

.form-exam .fc-select:focus {
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.3);
}

.form-exam .fc-select.fc-invalid {
    box-shadow: inset 0 0 0 1px #fc8181;
}

.form-exam .fc-error-tip {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    font-weight: 300;
    line-height: 16px;
    color: #fc8181;
}

/* ── Floating labels (same mechanism as form-diagnosis/form-financing) ───── */

.form-exam .fc-field {
    position: relative;
}

.form-exam .fc-field-label,
.form-exam .fc-select-label {
    position: absolute;
    left: 24px;
    right: 24px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    font-weight: 300;
    line-height: 20px;
    color: rgba(255, 255, 255, 0.5);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    pointer-events: none;
    transition: top 0.15s ease, font-size 0.15s ease, transform 0.15s ease, color 0.15s ease, line-height 0.15s ease;
}

.form-exam .fc-select-label {
    right: 48px;
}

.form-exam .fc-label-req {
    color: inherit;
}

.form-exam .fc-input:focus + .fc-field-label,
.form-exam .fc-input:not(:placeholder-shown) + .fc-field-label,
.form-exam .fc-select-wrap.is-floated .fc-select-label {
    top: 10px;
    transform: none;
    font-size: 10px;
    line-height: 12px;
    color: rgba(255, 255, 255, 0.7);
}

.form-exam .fc-chevron {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: var(--wp--preset--color--white);
    flex-shrink: 0;
}

/* ── Textarea + info icon ────────────────────────────────────────────────── */

.form-exam .fex-textarea-wrap {
    position: relative;
}

.form-exam .fex-textarea {
    height: auto;
    resize: vertical;
    min-height: 120px;
    padding: 18px 48px 18px 24px;
}

.form-exam .fex-textarea:focus,
.form-exam .fex-textarea:not(:placeholder-shown) {
    padding-top: 26px;
    padding-bottom: 10px;
}

.form-exam .fex-textarea-label {
    top: 18px;
    transform: none;
}

.form-exam .fex-textarea:focus + .fex-textarea-label,
.form-exam .fex-textarea:not(:placeholder-shown) + .fex-textarea-label {
    top: 10px;
    transform: none;
    font-size: 10px;
    line-height: 12px;
    color: rgba(255, 255, 255, 0.7);
}

.form-exam .fex-info-btn {
    position: absolute;
    top: 18px;
    right: 16px;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    color: var(--wp--preset--color--neutral-300);
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
    transition: color 0.15s;
}

.form-exam .fex-info-btn:hover {
    color: var(--wp--preset--color--neutral-100);
}

.form-exam .fex-tooltip {
    position: absolute;
    bottom: calc(100% + 8px);
    right: 0;
    background: var(--wp--preset--color--black);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 4px;
    padding: 10px 14px;
    font-size: 13px;
    font-weight: 300;
    color: var(--wp--preset--color--neutral-100);
    line-height: 18px;
    white-space: normal;
    max-width: 260px;
    z-index: 10;
    pointer-events: none;
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 0.15s ease, transform 0.15s ease;
}

.form-exam .fex-tooltip[hidden] {
    display: block;
}

.form-exam .fex-tooltip.is-open {
    opacity: 1;
    transform: translateY(0);
}

/* ── Form footer ─────────────────────────────────────────────────────────── */

.form-exam .fc-footer {
    display: flex;
    align-items: flex-end;
    gap: 24px;
}

.form-exam .fc-required-note {
    flex: 1;
    font-size: 16px;
    font-weight: 300;
    color: var(--wp--preset--color--neutral-100);
    line-height: 24px;
    margin: 0;
}

.form-exam .fc-submit-btn {
    border: 1px solid var(--wp--preset--color--white);
    background: none;
    color: var(--wp--preset--color--white);
    font-size: 16px;
    font-weight: 700;
    line-height: 20px;
    padding: 18px 40px;
    cursor: pointer;
    font-family: inherit;
    white-space: nowrap;
    transition: background 0.15s, color 0.15s;
    margin-top: 32px;
}

.form-exam .fc-submit-btn:hover {
    background: rgba(255, 255, 255, 0.05);
}

.form-exam .fc-submit-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.form-exam .fc-submit-btn.is-loading {
    position: relative;
    color: transparent !important;
    pointer-events: none;
}

.form-exam .fc-submit-btn.is-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 18px;
    height: 18px;
    margin: -9px 0 0 -9px;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-top-color: var(--wp--preset--color--white);
    border-radius: 50%;
    animation: fex-btn-spin 0.6s linear infinite;
}

@keyframes fex-btn-spin {
    to {
        transform: rotate(360deg);
    }
}

/* ── Messages ────────────────────────────────────────────────────────────── */

.form-exam .fc-msg {
    font-size: 14px;
    font-weight: 300;
    color: #fc8181;
    line-height: 20px;
    padding: 12px 0;
}

.form-exam .fc-msg--ok {
    color: #5cb85c;
}

.form-exam .fc-msg--err {
    color: #fc8181;
}

/* ── Sidebar / Summary ───────────────────────────────────────────────────── */

.form-exam .fc-summary {
    background: var(--wp--preset--color--black);
    border-radius: 16px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-exam .fc-summary-title {
    font-size: 14px;
    font-weight: 300;
    color: var(--wp--preset--color--neutral-200);
    line-height: 20px;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.form-exam .fc-summary-item {
    background: var(--wp--preset--color--black);
    border: 1px solid var(--wp--preset--color--neutral-300);
    border-radius: 4px;
    padding: 16px;
    display: flex;
    gap: 16px;
    align-items: flex-start;
    justify-content: space-between;
}

.form-exam .fc-summary-item-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
    min-width: 0;
}

.form-exam .fc-summary-item-name {
    font-size: 16px;
    font-weight: 400;
    color: var(--wp--preset--color--white);
    line-height: 24px;
    margin: 0;
}

.form-exam .fc-summary-item-price {
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: flex-end;
    flex-shrink: 0;
}

.form-exam .fc-s-netto {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 16px;
    color: var(--wp--preset--color--white);
    line-height: 24px;
}

.form-exam .fc-s-netto span:first-child {
    font-weight: 400;
    white-space: nowrap;
}

.form-exam .fc-s-label {
    font-weight: 300;
    font-size: 14px;
    color: var(--wp--preset--color--white);
}

.form-exam .fc-s-brutto {
    font-size: 12px;
    font-weight: 300;
    color: var(--wp--preset--color--neutral-200);
    line-height: 16px;
    margin: 0;
    white-space: nowrap;
}

/* ── Summary total ───────────────────────────────────────────────────────── */

.form-exam .fc-summary-total {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-exam .fc-total-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
}

.form-exam .fc-total-label {
    font-size: 16px;
    font-weight: 400;
    color: var(--wp--preset--color--white);
    line-height: 24px;
    flex: 1;
    min-width: 0;
}

.form-exam .fc-total-prices {
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: flex-end;
    flex-shrink: 0;
}

.form-exam .fc-total-netto {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 16px;
    color: var(--wp--preset--color--white);
    line-height: 24px;
    margin: 0;
}

.form-exam .fc-total-netto-val {
    font-weight: 400;
    white-space: nowrap;
}

.form-exam .fc-total-unit {
    font-weight: 300;
    white-space: nowrap;
}

.form-exam .fc-total-brutto {
    font-size: 12px;
    font-weight: 300;
    color: var(--wp--preset--color--neutral-200);
    line-height: 16px;
    margin: 0;
    white-space: nowrap;
}

.form-exam .fc-total-brutto-val {
    font-weight: 400;
}

/* ── Mobile sticky bar ───────────────────────────────────────────────────── */

.form-exam .fc-sticky-bar {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--wp--preset--color--dark);
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    z-index: 100;
    padding: 12px 0;
}

.form-exam .fc-sticky-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.form-exam .fc-sticky-total {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.form-exam .fc-sticky-label {
    font-size: 12px;
    font-weight: 300;
    color: var(--wp--preset--color--neutral-200);
    line-height: 16px;
}

.form-exam .fc-sticky-prices {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.form-exam .fc-sticky-netto {
    font-size: 16px;
    color: var(--wp--preset--color--white);
    line-height: 24px;
    margin: 0;
}

.form-exam .fc-sticky-netto-val {
    font-weight: 400;
}

.form-exam .fc-sticky-unit {
    font-weight: 300;
}

.form-exam .fc-sticky-brutto {
    font-size: 12px;
    font-weight: 300;
    color: var(--wp--preset--color--neutral-200);
    line-height: 16px;
    margin: 0;
}

.form-exam .fc-sticky-submit {
    border: 1px solid var(--wp--preset--color--white);
    background: none;
    color: var(--wp--preset--color--white);
    font-size: 14px;
    font-weight: 700;
    line-height: 20px;
    padding: 14px 20px;
    cursor: pointer;
    font-family: inherit;
    white-space: nowrap;
    flex-shrink: 0;
    transition: background 0.15s, color 0.15s;
}

.form-exam .fc-sticky-submit:hover {
    background: rgba(255, 255, 255, 0.05);
}

.form-exam .fc-sticky-submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ── Responsive ──────────────────────────────────────────────────────────── */

@media (max-width: 1200px) {
    .form-exam .fc-layout {
        gap: 48px;
    }
}

@media (max-width: 960px) {
    .form-exam .fc-layout {
        flex-direction: column;
    }

    .form-exam .fc-sidebar {
        flex: 1 1 auto;
        width: 100%;
        position: static;
        order: -1;
    }

    .form-exam .fc-form-col {
        flex: 1 1 auto;
        width: 100%;
    }
}

@media (max-width: 768px) {
    .form-exam .fc-sticky-bar {
        display: block;
    }

    .form-exam {
        padding-bottom: calc(48px + 72px);
    }

    .form-exam .fc-submit-btn {
        display: none;
    }
}

@media (max-width: 600px) {
    .form-exam {
        padding: 48px 0;
    }

    .form-exam .fc-title {
        font-size: 24px;
    }

    .form-exam .fc-course-name {
        font-size: 20px;
    }

    .form-exam .fc-footer {
        flex-direction: column;
        align-items: flex-start;
    }

    .form-exam .fex-tooltip {
        left: auto;
        right: 0;
        top: calc(100% + 4px);
        bottom: auto;
    }
}