/* ══════════════════════════════════════════════════════════════
   TheCoin — NDIS Referral Form Styles
   ══════════════════════════════════════════════════════════════ */

.tcnrf-wrap {
    max-width: 860px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 15px;
    color: #2c3e50;
}

/* ── Message banner ─────────────────────────────────────────── */
#tcnrf-form-message {
    display: none;
    padding: 14px 18px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 15px;
    font-weight: 600;
}
#tcnrf-form-message.tcnrf-success {
    display: block;
    background: #d4edda;
    border: 1px solid #28a745;
    color: #155724;
}
#tcnrf-form-message.tcnrf-error {
    display: block;
    background: #f8d7da;
    border: 1px solid #dc3545;
    color: #721c24;
}

/* ── Sections ───────────────────────────────────────────────── */
.tcnrf-section {
    background: #fff;
    border: 1px solid #dde3ea;
    border-radius: 8px;
    padding: 24px 28px;
    margin-bottom: 22px;
    box-shadow: 0 1px 4px rgba(0,0,0,.06);
}

.tcnrf-section-title {
    font-size: 18px;
    font-weight: 700;
    color: #1a5276;
    margin: 0 0 18px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #1a5276;
}

.tcnrf-subsection-title {
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: #2e86c1;
    margin: 18px 0 10px 0;
    padding-bottom: 4px;
    border-bottom: 1px solid #d6eaf8;
}

/* ── Rows & Fields ──────────────────────────────────────────── */
.tcnrf-row {
    display: flex;
    gap: 18px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.tcnrf-row-full .tcnrf-field {
    flex: 1 1 100%;
}

.tcnrf-field {
    flex: 1 1 calc(50% - 9px);
    min-width: 200px;
    display: flex;
    flex-direction: column;
}

.tcnrf-field-half {
    flex: 0 0 calc(50% - 9px);
}

.tcnrf-field label {
    font-size: 13px;
    font-weight: 600;
    color: #34495e;
    margin-bottom: 5px;
}

.tcnrf-required {
    color: #e74c3c;
    margin-left: 2px;
}

.tcnrf-field input[type="text"],
.tcnrf-field input[type="email"],
.tcnrf-field input[type="tel"],
.tcnrf-field input[type="date"],
.tcnrf-field input[type="number"],
.tcnrf-field textarea,
.tcnrf-field select {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid #c8d3dc;
    border-radius: 5px;
    font-size: 14px;
    color: #2c3e50;
    background: #fafcfe;
    transition: border-color .2s, box-shadow .2s;
    box-sizing: border-box;
    font-family: inherit;
}

.tcnrf-field input:focus,
.tcnrf-field textarea:focus,
.tcnrf-field select:focus {
    outline: none;
    border-color: #2e86c1;
    box-shadow: 0 0 0 3px rgba(46,134,193,.15);
    background: #fff;
}

.tcnrf-field textarea {
    resize: vertical;
}

/* ── Radio group ────────────────────────────────────────────── */
.tcnrf-radio-group {
    display: flex;
    gap: 18px;
    align-items: center;
    padding: 9px 0;
}

.tcnrf-radio-group label {
    font-weight: 400;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    margin-bottom: 0;
    color: #2c3e50;
}

.tcnrf-radio-group input[type="radio"] {
    width: 16px;
    height: 16px;
    accent-color: #2e86c1;
    cursor: pointer;
}

/* ── Checkbox grid ──────────────────────────────────────────── */
.tcnrf-checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 10px 20px;
}

.tcnrf-checkbox-grid label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #2c3e50;
    cursor: pointer;
}

.tcnrf-checkbox-grid input[type="checkbox"] {
    width: 17px;
    height: 17px;
    flex-shrink: 0;
    accent-color: #1a5276;
    cursor: pointer;
}

/* ── Validation errors ──────────────────────────────────────── */
.tcnrf-input-error {
    border-color: #e74c3c !important;
    background: #fff8f8 !important;
    box-shadow: 0 0 0 3px rgba(231,76,60,.15) !important;
}

.tcnrf-field-error {
    display: block;
    color: #e74c3c;
    font-size: 12px;
    margin-top: 4px;
    min-height: 16px;
    font-weight: 600;
}

/* ── Submit button ──────────────────────────────────────────── */
.tcnrf-submit-wrap {
    text-align: center;
    margin: 10px 0 30px;
}

.tcnrf-submit-btn {
    background: #1a5276;
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    padding: 14px 48px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    letter-spacing: .03em;
    transition: background .2s, transform .1s;
}

.tcnrf-submit-btn:hover {
    background: #154360;
}

.tcnrf-submit-btn:active {
    transform: scale(.98);
}

.tcnrf-submit-btn:disabled {
    background: #aab7c4;
    cursor: not-allowed;
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 600px) {
    .tcnrf-section {
        padding: 16px 14px;
    }
    .tcnrf-field {
        flex: 1 1 100%;
    }
    .tcnrf-field-half {
        flex: 1 1 100%;
    }
    .tcnrf-checkbox-grid {
        grid-template-columns: 1fr;
    }
    .tcnrf-submit-btn {
        width: 100%;
        padding: 14px 20px;
    }
}
