/**
 * Training Needs Analysis form styles.
 *
 * Embeds inside a host page (Luxury Academy site), so styles are
 * scoped to .tna-form-wrap and avoid resetting things outside it. The
 * palette is restrained: a single dark accent for buttons and
 * progress, neutral greys for borders and labels.
 */

.tna-form-wrap {
    max-width: 760px;
    margin: 0 auto;
    padding: 24px 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: #1a1a1a;
    font-size: 16px;
    line-height: 1.55;
}

.tna-form-wrap * {
    box-sizing: border-box;
}

/* ── Honeypot: hidden from humans ── */
.tna-honeypot {
    position: absolute !important;
    left: -10000px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
}

/* ── Progress bar ── */
.tna-progress {
    margin: 0 0 28px 0;
}
.tna-progress__bar {
    height: 4px;
    background: #ececec;
    border-radius: 2px;
    overflow: hidden;
}
.tna-progress__fill {
    height: 100%;
    background: #1a1a1a;
    transition: width 0.3s ease;
    width: 0;
}
.tna-progress__label {
    display: block;
    font-size: 13px;
    color: #777;
    margin-top: 8px;
    letter-spacing: 0.02em;
}

/* ── Screens ── */
.tna-screen {
    display: none;
}
.tna-screen--active {
    display: block;
}

.tna-screen__title {
    font-size: 28px;
    font-weight: 500;
    color: #1a1a1a;
    margin: 0 0 16px 0;
    line-height: 1.25;
}

.tna-screen__intro p {
    margin: 0 0 14px 0;
    color: #333;
}

.tna-screen__instructions {
    font-size: 15px;
    color: #555;
    margin: 0 0 24px 0;
    padding: 14px 16px;
    background: #f6f4f1;
    border-left: 3px solid #1a1a1a;
}

/* ── Fields ── */
.tna-field {
    margin: 0 0 24px 0;
}

.tna-field__label {
    display: block;
    font-weight: 500;
    color: #1a1a1a;
    margin: 0 0 10px 0;
    font-size: 16px;
}

.tna-field__helper {
    font-size: 14px;
    color: #777;
    font-style: italic;
    margin: -4px 0 10px 0;
}

.tna-field__error,
.tna-item__error {
    font-size: 13px;
    color: #b54a4a;
    margin: 6px 0 0 0;
    display: none;
}

.tna-field__error--visible,
.tna-item__error--visible {
    display: block;
}

.tna-field__sub {
    margin-top: 10px;
}

/* ── Inputs ── */
.tna-input,
.tna-select,
.tna-textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 3px;
    font-size: 16px;
    font-family: inherit;
    color: #1a1a1a;
    background: #fff;
}

.tna-input:focus,
.tna-select:focus,
.tna-textarea:focus {
    outline: none;
    border-color: #1a1a1a;
}

.tna-textarea {
    resize: vertical;
    min-height: 110px;
    line-height: 1.5;
}

.tna-select {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path fill='%23555' d='M0 0l6 8 6-8z'/></svg>");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

/* ── Radio and checkbox groups ── */
.tna-radio-group,
.tna-checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.tna-radio,
.tna-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    padding: 8px 10px;
    border-radius: 3px;
    transition: background 0.15s ease;
}

.tna-radio:hover,
.tna-checkbox:hover {
    background: #f6f4f1;
}

.tna-radio input,
.tna-checkbox input {
    margin: 4px 0 0 0;
    flex-shrink: 0;
}

.tna-radio__label,
.tna-checkbox__label {
    color: #1a1a1a;
    font-size: 16px;
    line-height: 1.45;
}

/* ── Diagnostic items ── */
.tna-item {
    margin: 0 0 28px 0;
    padding: 0 0 24px 0;
    border-bottom: 1px solid #eee;
}

.tna-item:last-of-type {
    border-bottom: none;
}

.tna-item__stem {
    margin: 0 0 12px 0;
    color: #1a1a1a;
    font-size: 16px;
    line-height: 1.5;
}

.tna-item__scale {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tna-scale-option {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 3px;
    cursor: pointer;
    background: #fff;
    transition: all 0.15s ease;
    flex: 1;
    min-width: 140px;
    justify-content: center;
}

.tna-scale-option:hover {
    border-color: #1a1a1a;
}

.tna-scale-option input {
    margin: 0;
}

.tna-scale-option__label {
    font-size: 14px;
    color: #1a1a1a;
}

.tna-scale-option--na {
    flex: 0 0 80px;
    min-width: 80px;
    margin-left: auto;
}

.tna-scale-option--na .tna-scale-option__label {
    color: #777;
    font-style: italic;
}

/* ── Buttons / nav ── */
.tna-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-top: 32px;
}

.tna-nav:only-child {
    justify-content: flex-end;
}

.tna-btn {
    appearance: none;
    -webkit-appearance: none;
    border: 1px solid transparent;
    background: transparent;
    cursor: pointer;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 500;
    border-radius: 3px;
    font-family: inherit;
    line-height: 1.2;
    transition: all 0.15s ease;
}

.tna-btn--primary {
    background: #1a1a1a;
    color: #fff;
    border-color: #1a1a1a;
}

.tna-btn--primary:hover {
    background: #333;
}

.tna-btn--secondary {
    background: transparent;
    color: #555;
    border-color: #ccc;
}

.tna-btn--secondary:hover {
    color: #1a1a1a;
    border-color: #1a1a1a;
}

/* ── Privacy notice ── */
.tna-privacy-notice {
    font-size: 13px;
    color: #777;
    line-height: 1.5;
    margin: 24px 0 0 0;
    padding: 14px 16px;
    background: #f6f4f1;
    border-radius: 3px;
}

/* ── Opt-in toggle (identification screen) ── */
.tna-opt-in {
    background: #f6f4f1;
    border: 1px solid #e0dcd5;
    padding: 16px 20px;
    border-radius: 4px;
    margin: 0 0 20px 0;
}

.tna-opt-in .tna-checkbox {
    padding: 0;
    margin: 0;
    background: transparent;
}

.tna-opt-in .tna-checkbox:hover {
    background: transparent;
}

.tna-checkbox--primary .tna-checkbox__label {
    font-size: 17px;
    font-weight: 500;
    color: #1a1a1a;
}

.tna-identification {
    margin-top: 4px;
    padding-top: 18px;
    border-top: 1px dashed #e0dcd5;
}

/* ── Thank-you screen spinner ── */
.tna-spinner {
    width: 36px;
    height: 36px;
    margin: 36px auto;
    border: 3px solid #ececec;
    border-top-color: #1a1a1a;
    border-radius: 50%;
    animation: tna-spin 1s linear infinite;
}

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

/* ── Mobile adjustments ── */
@media (max-width: 600px) {
    .tna-form-wrap {
        padding: 16px 12px;
    }

    .tna-screen__title {
        font-size: 22px;
    }

    .tna-scale-option {
        min-width: 100%;
        flex-basis: 100%;
    }

    .tna-scale-option--na {
        min-width: 100%;
        flex-basis: 100%;
        margin-left: 0;
    }

    .tna-nav {
        flex-direction: column-reverse;
    }

    .tna-btn {
        width: 100%;
    }
}
