/**
 * CT Custom Application Form Styles
 * Save as: wp-content/themes/salient-child/ct-form.css
 */

/* ── WRAPPER ─────────────────────────────────────────────── */
.ct-application-wrap {
    max-width: 720px;
    margin: 40px auto;
    font-family: 'Inter', sans-serif;
}

.ct-form-title {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 24px;
    color: #1a1a2e;
}

/* ── SECTIONS ────────────────────────────────────────────── */
.ct-form-section {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 10px;
    padding: 28px;
    margin-bottom: 20px;
}

.ct-section-title {
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #4080ff;
    margin: 0 0 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eef2ff;
}

/* ── FIELD GROUPS ────────────────────────────────────────── */
.ct-field-group {
    margin-bottom: 18px;
}

.ct-field-group:last-child {
    margin-bottom: 0;
}

.ct-field-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #444;
    margin-bottom: 6px;
}

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

.ct-optional {
    color: #999;
    font-weight: 400;
    font-size: 12px;
}

/* Inline group (phone + code) */
.ct-field-group--inline {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.ct-field-sub {
    flex: 0 0 180px;
}

.ct-field-sub--grow {
    flex: 1;
}

/* ── INPUTS ──────────────────────────────────────────────── */
.ct-application-wrap input[type="text"],
.ct-application-wrap input[type="email"],
.ct-application-wrap input[type="tel"],
.ct-application-wrap input[type="url"],
.ct-application-wrap input[type="number"],
.ct-application-wrap select,
.ct-application-wrap textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    color: #333;
    background: #fafafa;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

.ct-application-wrap input:focus,
.ct-application-wrap select:focus,
.ct-application-wrap textarea:focus {
    outline: none;
    border-color: #4080ff;
    box-shadow: 0 0 0 3px rgba(64, 128, 255, 0.1);
    background: #fff;
}

.ct-application-wrap textarea {
    resize: vertical;
    min-height: 100px;
}

.ct-application-wrap input[type="file"] {
    padding: 8px;
    background: #f5f7ff;
    border: 1px dashed #b0c4ff;
    cursor: pointer;
}

.ct-application-wrap small {
    display: block;
    margin-top: 4px;
    color: #888;
    font-size: 12px;
}

/* Error state */
.ct-field-error {
    border-color: #e74c3c !important;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1) !important;
}

.ct-group-error .ct-check-label,
.ct-group-error .ct-radio-label {
    color: #e74c3c;
}

/* ── RADIO & CHECKBOX ────────────────────────────────────── */
.ct-radio-group,
.ct-checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 6px;
}

.ct-radio-label,
.ct-check-label {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 14px;
    font-weight: 400;
    color: #333;
    cursor: pointer;
    padding: 8px 14px;
    border: 1px solid #ddd;
    border-radius: 6px;
    transition: border-color 0.2s, background 0.2s;
}

.ct-radio-label:hover,
.ct-check-label:hover {
    border-color: #4080ff;
    background: #f5f7ff;
}

.ct-radio-label input,
.ct-check-label input {
    width: auto !important;
    margin: 0 !important;
    accent-color: #4080ff;
}

/* ── EMPLOYMENT REPEATER ─────────────────────────────────── */
.ct-employment-entry {
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 18px;
    margin-bottom: 16px;
    background: #fafafa;
}

.ct-entry-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}

.ct-entry-label {
    font-size: 13px;
    font-weight: 700;
    color: #4080ff;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.ct-remove-entry {
    background: none;
    border: none;
    color: #e74c3c;
    font-size: 12px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background 0.2s;
}

.ct-remove-entry:hover {
    background: #fdf2f2;
}

/* ── BUTTONS ─────────────────────────────────────────────── */
.ct-btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #4080ff;
    color: #fff;
    border: none;
    padding: 14px 36px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    min-width: 200px;
}

.ct-btn-primary:hover {
    background: #2d6aff;
}

.ct-btn-primary:active {
    transform: scale(0.98);
}

.ct-btn-primary:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.ct-btn-secondary {
    background: none;
    border: 1px dashed #4080ff;
    color: #4080ff;
    padding: 9px 20px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    margin-top: 4px;
}

.ct-btn-secondary:hover {
    background: #f5f7ff;
}

.ct-form-submit {
    text-align: center;
    border: none !important;
    background: none !important;
    padding: 8px 0 !important;
}

/* ── NOTICE ──────────────────────────────────────────────── */
#ct-form-notice {
    padding: 14px 18px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
}

#ct-form-notice.awsm-success-message {
    background: #f0fdf4;
    border: 1px solid #86efac;
    color: #166534;
}

#ct-form-notice.awsm-error-message {
    background: #fef2f2;
    border: 1px solid #fca5a5;
    color: #991b1b;
}

#ct-form-notice ul {
    margin: 8px 0 0 18px;
    padding: 0;
}

#ct-form-notice li {
    margin-bottom: 4px;
}

/* ── TOM SELECT OVERRIDES ────────────────────────────────── */
.ts-wrapper {
    margin-top: 0 !important;
}

.ts-control {
    border: 1px solid #ddd !important;
    border-radius: 6px !important;
    background: #fafafa !important;
    font-size: 14px !important;
    padding: 8px 12px !important;
    min-height: 42px !important;
}

.ts-wrapper.focus .ts-control {
    border-color: #4080ff !important;
    box-shadow: 0 0 0 3px rgba(64, 128, 255, 0.1) !important;
    background: #fff !important;
}

.ts-dropdown {
    border-radius: 6px !important;
    border: 1px solid #ddd !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08) !important;
}

.ts-dropdown .option.selected,
.ts-dropdown .option:hover {
    background: #f5f7ff !important;
    color: #4080ff !important;
}

/* ── RESPONSIVE ──────────────────────────────────────────── */
@media (max-width: 600px) {
    .ct-field-group--inline {
        flex-direction: column;
    }

    .ct-field-sub {
        flex: 1 1 100%;
    }

    .ct-form-section {
        padding: 18px;
    }

    .ct-radio-group,
    .ct-checkbox-group {
        flex-direction: column;
    }

    .ct-btn-primary {
        width: 100%;
    }
}

.cf-turnstile,
.cf-turnstile iframe {
    height: 65px !important;
    min-height: 65px !important;
}

.ct-consent-text {
    background: #f8f9ff;
    border: 1px solid #e0e7ff;
    border-radius: 6px;
    padding: 16px 20px;
    font-size: 13px;
    color: #555;
    line-height: 1.7;
}

.ct-consent-text ul {
    margin: 10px 0 0 18px;
    padding: 0;
}

.ct-consent-text li {
    margin-bottom: 6px;
}

.ts-dropdown {
    position: absolute !important;
    z-index: 9999 !important;
}

.ct-field-group {
    position: relative;
}

.ct-form-section {
    overflow: visible !important;
}

.ct-application-wrap {
    overflow: visible !important;
}

.ts-dropdown {
    position: absolute !important;
    z-index: 99999 !important;
    width: 100% !important;
}

.ct-field-group {
    position: relative;
    overflow: visible !important;
}

.ts-dropdown.tom-select-dropdown-body {
    z-index: 99999 !important;
}

body > .ts-dropdown {
    z-index: 99999 !important;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    border: 1px solid #ddd;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

body > .ts-dropdown .option {
    padding: 8px 12px;
    color: #333;
}

body > .ts-dropdown .option:hover,
body > .ts-dropdown .option.active {
    background: #f5f7ff;
    color: #4080ff;
}

.ct-application-wrap select {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px !important;
    cursor: pointer;
}

.ct-tag-input-wrap {
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fafafa;
    padding: 6px 10px;
    min-height: 42px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    cursor: text;
}

.ct-tag-input-wrap input[type="text"] {
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    background: transparent !important;
    padding: 4px 0 !important;
    flex: 1;
    min-width: 120px;
    font-size: 14px;
}

.ct-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #eef2ff;
    color: #4080ff;
    border-radius: 20px;
    padding: 3px 10px 3px 12px;
    font-size: 13px;
    font-weight: 500;
}

.ct-tag button {
    background: none;
    border: none;
    color: #4080ff;
    font-size: 15px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}