/* ══════════════════════════════════════════
   Cargo Titan Freight — Forms v1.0.8
   Clean single-file rewrite
   Theme: #61187C
══════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700;800&display=swap');

/* ── Reset inside wrappers ── */
#ctf-driver-wrap,
#ctf-quote-wrap,
#ctf-driver-wrap *,
#ctf-quote-wrap * {
    box-sizing: border-box !important;
    font-family: 'Poppins', sans-serif !important;
}

/* ── Outer card ── */
#ctf-driver-wrap,
#ctf-quote-wrap {
    max-width: 880px !important;
    margin: 0 auto !important;
    background: #ffffff !important;
    border-radius: 12px !important;
    padding: 40px 44px !important;
    box-shadow: 0 4px 28px rgba(0,0,0,0.09) !important;
    color: #222 !important;
}

/* ── Form header ── */
#ctf-driver-wrap .ctf-form-header,
#ctf-quote-wrap  .ctf-form-header {
    margin-bottom: 32px !important;
    padding-bottom: 22px !important;
    border-bottom: 3px solid #61187C !important;
}
#ctf-driver-wrap .ctf-form-header h2,
#ctf-quote-wrap  .ctf-form-header h2 {
    font-size: 28px !important;
    font-weight: 800 !important;
    color: #61187C !important;
    margin: 0 0 8px !important;
    padding: 0 !important;
    line-height: 1.25 !important;
    letter-spacing: -0.3px !important;
    text-transform: none !important;
    border: none !important;
    background: transparent !important;
}
#ctf-driver-wrap .ctf-form-header p,
#ctf-quote-wrap  .ctf-form-header p {
    color: #666 !important;
    font-size: 15px !important;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1.6 !important;
}

/* ── Section titles ── */
#ctf-driver-wrap .ctf-section-title,
#ctf-quote-wrap  .ctf-section-title {
    display: block !important;
    font-size: 10.5px !important;
    font-weight: 800 !important;
    letter-spacing: 2px !important;
    text-transform: uppercase !important;
    color: #61187C !important;
    border: none !important;
    border-bottom: 2px solid #61187C !important;
    padding: 0 0 7px !important;
    margin: 36px 0 22px !important;
    background: transparent !important;
}

/* ── Grid rows ── */
#ctf-driver-wrap .ctf-row,
#ctf-quote-wrap  .ctf-row {
    display: grid !important;
    gap: 20px !important;
    margin-bottom: 20px !important;
    width: 100% !important;
    float: none !important;
}
#ctf-driver-wrap .ctf-col-2,
#ctf-quote-wrap  .ctf-col-2 { grid-template-columns: 1fr 1fr !important; }
#ctf-driver-wrap .ctf-col-3,
#ctf-quote-wrap  .ctf-col-3 { grid-template-columns: 1fr 1fr 1fr !important; }

/* ── Field wrapper ── */
#ctf-driver-wrap .ctf-field,
#ctf-quote-wrap  .ctf-field {
    display: flex !important;
    flex-direction: column !important;
    gap: 7px !important;
    margin-bottom: 20px !important;
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
    float: none !important;
    width: 100% !important;
}

/* ── Labels ── */
#ctf-driver-wrap .ctf-field > label:first-child,
#ctf-quote-wrap  .ctf-field > label:first-child {
    display: block !important;
    font-size: 10.5px !important;
    font-weight: 700 !important;
    color: #2d2d2d !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    margin: 0 0 2px !important;
    padding: 0 !important;
    line-height: 1.4 !important;
    background: transparent !important;
    border: none !important;
    cursor: default !important;
}
#ctf-driver-wrap .ctf-field > label:first-child span,
#ctf-quote-wrap  .ctf-field > label:first-child span {
    color: #61187C !important;
    font-size: 14px !important;
}

/* ── Text inputs / select / textarea ── */
#ctf-driver-wrap .ctf-field input[type="text"],
#ctf-driver-wrap .ctf-field input[type="email"],
#ctf-driver-wrap .ctf-field input[type="tel"],
#ctf-driver-wrap .ctf-field input[type="date"],
#ctf-driver-wrap .ctf-field select,
#ctf-driver-wrap .ctf-field textarea,
#ctf-quote-wrap  .ctf-field input[type="text"],
#ctf-quote-wrap  .ctf-field input[type="email"],
#ctf-quote-wrap  .ctf-field input[type="tel"],
#ctf-quote-wrap  .ctf-field input[type="date"],
#ctf-quote-wrap  .ctf-field select,
#ctf-quote-wrap  .ctf-field textarea {
    -webkit-appearance: none !important;
    appearance: none !important;
    display: block !important;
    width: 100% !important;
    padding: 11px 15px !important;
    font-size: 14px !important;
    font-weight: 400 !important;
    color: #222 !important;
    background: #f7f7fb !important;
    border: 1.5px solid #e0e0e8 !important;
    border-radius: 7px !important;
    outline: none !important;
    box-shadow: none !important;
    transition: border-color 0.18s, box-shadow 0.18s !important;
    line-height: 1.5 !important;
    margin: 0 !important;
    float: none !important;
    height: auto !important;
    text-transform: none !important;
    letter-spacing: normal !important;
}
#ctf-driver-wrap .ctf-field select,
#ctf-quote-wrap  .ctf-field select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='7' viewBox='0 0 12 7'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2361187C' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 14px center !important;
    background-size: 12px !important;
    padding-right: 38px !important;
    cursor: pointer !important;
}
#ctf-driver-wrap .ctf-field textarea,
#ctf-quote-wrap  .ctf-field textarea {
    resize: vertical !important;
    min-height: 100px !important;
}
#ctf-driver-wrap .ctf-field input:focus,
#ctf-driver-wrap .ctf-field select:focus,
#ctf-driver-wrap .ctf-field textarea:focus,
#ctf-quote-wrap  .ctf-field input:focus,
#ctf-quote-wrap  .ctf-field select:focus,
#ctf-quote-wrap  .ctf-field textarea:focus {
    border-color: #61187C !important;
    background: #fff !important;
    box-shadow: 0 0 0 3px rgba(97,24,124,0.1) !important;
}
#ctf-driver-wrap .ctf-field input.ctf-error,
#ctf-driver-wrap .ctf-field select.ctf-error,
#ctf-driver-wrap .ctf-field textarea.ctf-error,
#ctf-quote-wrap  .ctf-field input.ctf-error,
#ctf-quote-wrap  .ctf-field select.ctf-error,
#ctf-quote-wrap  .ctf-field textarea.ctf-error {
    border-color: #e74c3c !important;
    background: #fff8f8 !important;
}

/* ── Radio buttons ── */
#ctf-driver-wrap .ctf-radio-group,
#ctf-quote-wrap  .ctf-radio-group {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 24px !important;
    padding: 10px 0 4px !important;
    margin: 0 !important;
    background: transparent !important;
    border: none !important;
    list-style: none !important;
}
#ctf-driver-wrap .ctf-radio,
#ctf-quote-wrap  .ctf-radio {
    display: inline-flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 8px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    color: #333 !important;
    cursor: pointer !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    background: transparent !important;
    line-height: 1 !important;
    white-space: nowrap !important;
}
#ctf-driver-wrap .ctf-radio input[type="radio"],
#ctf-quote-wrap  .ctf-radio input[type="radio"] {
    -webkit-appearance: none !important;
    appearance: none !important;
    display: inline-block !important;
    width: 18px !important;
    height: 18px !important;
    min-width: 18px !important;
    border: 2px solid #c0b0cc !important;
    border-radius: 50% !important;
    background: #fff !important;
    cursor: pointer !important;
    flex-shrink: 0 !important;
    transition: border-color 0.15s !important;
    margin: 0 !important;
    padding: 0 !important;
    float: none !important;
    vertical-align: middle !important;
    box-shadow: none !important;
    outline: none !important;
}
#ctf-driver-wrap .ctf-radio input[type="radio"]:checked,
#ctf-quote-wrap  .ctf-radio input[type="radio"]:checked {
    border-color: #61187C !important;
    background: #61187C !important;
    box-shadow: inset 0 0 0 3px #fff !important;
}
#ctf-driver-wrap .ctf-radio input[type="radio"]:hover,
#ctf-quote-wrap  .ctf-radio input[type="radio"]:hover {
    border-color: #61187C !important;
}

/* ── Conditional hidden sections ── */
#ctf-truck-number-field,
#ctf-insurance-section,
#ctf-violations-detail {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    overflow: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
}
#ctf-truck-number-field.ctf-visible,
#ctf-violations-detail.ctf-visible {
    display: flex !important;
    visibility: visible !important;
    height: auto !important;
    overflow: visible !important;
    margin-bottom: 20px !important;
    padding: 0 !important;
}
#ctf-insurance-section.ctf-visible {
    display: block !important;
    visibility: visible !important;
    height: auto !important;
    overflow: visible !important;
    margin-bottom: 0 !important;
    padding: 0 !important;
}

/* ══ FILE UPLOAD BOXES ══════════════════════════════════════════ */
#ctf-driver-wrap input[type="file"] {
    display: none !important;
}

#ctf-driver-wrap .ctf-file-upload-label {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    gap: 10px !important;
    width: 100% !important;
    min-height: 120px !important;
    padding: 22px 16px !important;
    background: #faf5ff !important;
    border: 2px dashed #61187C !important;
    border-radius: 12px !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    text-decoration: none !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
    box-shadow: none !important;
    color: #61187C !important;
}
#ctf-driver-wrap .ctf-file-upload-label:hover {
    background: #f3e8ff !important;
    border-color: #4a1260 !important;
    border-style: solid !important;
    box-shadow: 0 6px 20px rgba(97,24,124,0.15) !important;
    transform: translateY(-2px) !important;
}
#ctf-driver-wrap .ctf-file-icon {
    font-size: 32px !important;
    line-height: 1 !important;
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
}
#ctf-driver-wrap .ctf-file-text {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 4px !important;
    margin: 0 !important;
    padding: 0 !important;
}
#ctf-driver-wrap .ctf-file-text-main {
    display: block !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    color: #61187C !important;
    text-transform: uppercase !important;
    letter-spacing: 0.8px !important;
    line-height: 1.3 !important;
    margin: 0 !important;
    padding: 0 !important;
}
#ctf-driver-wrap .ctf-file-text-sub {
    display: block !important;
    font-size: 11px !important;
    font-weight: 400 !important;
    color: #9b59b6 !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
    line-height: 1.3 !important;
    margin: 0 !important;
    padding: 0 !important;
}
#ctf-driver-wrap .ctf-file-name {
    display: block !important;
    font-size: 11px !important;
    color: #999 !important;
    margin: 4px 0 0 !important;
    padding: 0 !important;
    font-style: italic !important;
    text-align: center !important;
    line-height: 1.4 !important;
}
#ctf-driver-wrap .ctf-file-name.ctf-file-selected {
    color: #61187C !important;
    font-style: normal !important;
    font-weight: 600 !important;
}
/* Required badge */
#ctf-driver-wrap .ctf-file-required-badge {
    display: inline-block !important;
    background: #61187C !important;
    color: #fff !important;
    font-size: 9px !important;
    font-weight: 700 !important;
    padding: 2px 7px !important;
    border-radius: 4px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    margin-left: 6px !important;
    vertical-align: middle !important;
    line-height: 1.6 !important;
}

/* ── Checkboxes ── */
#ctf-driver-wrap .ctf-checkbox-group {
    display: flex !important;
    flex-direction: column !important;
    gap: 14px !important;
    padding: 6px 0 !important;
}
#ctf-driver-wrap .ctf-checkbox-label {
    display: flex !important;
    align-items: flex-start !important;
    gap: 10px !important;
    font-size: 14px !important;
    color: #333 !important;
    cursor: pointer !important;
    font-weight: 400 !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
    line-height: 1.5 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    background: transparent !important;
}
#ctf-driver-wrap .ctf-checkbox-label input[type="checkbox"] {
    -webkit-appearance: auto !important;
    appearance: auto !important;
    width: 18px !important;
    height: 18px !important;
    min-width: 18px !important;
    margin: 2px 0 0 !important;
    padding: 0 !important;
    accent-color: #61187C !important;
    cursor: pointer !important;
    flex-shrink: 0 !important;
    float: none !important;
    border: none !important;
}

/* ── Submit button ── */
#ctf-driver-wrap .ctf-submit-wrap,
#ctf-quote-wrap  .ctf-submit-wrap {
    margin-top: 32px !important;
    padding-top: 24px !important;
    border-top: 1px solid #f0f0f0 !important;
}
#ctf-driver-wrap .ctf-btn,
#ctf-quote-wrap  .ctf-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: #61187C !important;
    color: #fff !important;
    border: none !important;
    border-radius: 8px !important;
    padding: 13px 40px !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    letter-spacing: 0.4px !important;
    text-transform: none !important;
    text-decoration: none !important;
    transition: background 0.2s, box-shadow 0.2s, transform 0.1s !important;
    box-shadow: 0 4px 14px rgba(97,24,124,0.3) !important;
    min-width: 180px !important;
    height: auto !important;
    line-height: 1.5 !important;
    outline: none !important;
}
#ctf-driver-wrap .ctf-btn:hover,
#ctf-quote-wrap  .ctf-btn:hover {
    background: #4a1260 !important;
    box-shadow: 0 6px 18px rgba(97,24,124,0.4) !important;
    color: #fff !important;
}
#ctf-driver-wrap .ctf-btn:disabled,
#ctf-quote-wrap  .ctf-btn:disabled {
    background: #bbb !important;
    cursor: not-allowed !important;
    box-shadow: none !important;
}

/* ── Messages ── */
#ctf-driver-wrap .ctf-message,
#ctf-quote-wrap  .ctf-message {
    margin-top: 20px !important;
    padding: 15px 20px !important;
    border-radius: 8px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    line-height: 1.6 !important;
    display: none !important;
}
#ctf-driver-wrap .ctf-message.success,
#ctf-quote-wrap  .ctf-message.success {
    background: #f0faf4 !important;
    border: 1.5px solid #27ae60 !important;
    color: #1a7a40 !important;
    display: block !important;
}
#ctf-driver-wrap .ctf-message.error,
#ctf-quote-wrap  .ctf-message.error {
    background: #fdf0ef !important;
    border: 1.5px solid #e74c3c !important;
    color: #922b21 !important;
    display: block !important;
}

/* ── Responsive ── */
@media (max-width: 768px) {
    #ctf-driver-wrap, #ctf-quote-wrap { padding: 24px 18px !important; }
    #ctf-driver-wrap .ctf-col-2,
    #ctf-driver-wrap .ctf-col-3,
    #ctf-quote-wrap  .ctf-col-2,
    #ctf-quote-wrap  .ctf-col-3 { grid-template-columns: 1fr !important; }
}
