/* =====================================================
   TCI Freight – Landing Form Stylesheet
   Used by both the public LTL page and the Livewire component.
   Brand palette: TCI Blue #1890d7, Gold #f8b400, Dark #1b1e34
   ===================================================== */

:root {
    --tci-blue:        #1890d7;
    --tci-blue-dark:   #0d6fb0;
    --tci-blue-light:  #e7f3fb;
    --tci-gold:        #f8b400;
    --tci-gold-dark:   #d99b00;
    --tci-dark:        #1b1e34;
    --tci-text:        #1a1f36;
    --tci-muted:       #6b7280;
    --tci-border:      #d6dae3;
    --tci-bg:          #ffffff;
    --tci-card:        #ffffff;
    --tci-ok:          #16a34a;
    --tci-ok-bg:       #dcfce7;
    --tci-err:         #dc2626;
    --tci-err-bg:      #fee2e2;
}

/* ============ HOST ============ */
.tci-form-host {
    font-family: 'Inter', 'Gill Sans', 'Segoe UI', sans-serif;
    color: var(--tci-text);
    max-width: 1080px;
    margin: 0 auto;
    padding: 90px 20px 40px;
    background-image: url(../assets/images/formbg.png);
    background-position: top right;
    background-repeat: no-repeat;
}
.tci-form-host h1.heading {
    text-align: center;
    font-weight: 700;
    font-size: 26px;
    letter-spacing: -0.2px;
    margin: 0 0 8px;
}
.tci-form-host .heading-sub {
    text-align: center;
    color: var(--tci-muted);
    font-size: 14px;
    margin-bottom: 30px;
}

/* ============ STEP INDICATOR ============ */
.steps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin: 0 auto 36px;
    max-width: 720px;
}
.step-item {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    position: relative;
}
.step-item .num {
    width: 32px; height: 32px;
    border-radius: 50%;
    background: #eef0f5;
    color: var(--tci-muted);
    display: flex; align-items: center; justify-content: center;
    font-weight: 700;
    font-size: 13px;
    border: 2px solid #eef0f5;
    transition: all .2s;
    flex-shrink: 0;
}
.step-item .label {
    font-size: 13px;
    color: var(--tci-muted);
    font-weight: 500;
    white-space: nowrap;
}
.step-item.active .num {
    background: var(--tci-blue);
    border-color: var(--tci-blue);
    color: #fff;
    box-shadow: 0 4px 14px rgba(24,144,215,.3);
}
.step-item.active .label { color: var(--tci-text); font-weight: 600; }
.step-item.done .num {
    background: var(--tci-gold);
    border-color: var(--tci-gold);
    color: var(--tci-dark);
}
.step-item.done .label { color: var(--tci-text); }
.step-connector {
    flex: 1;
    height: 2px;
    background: #eef0f5;
    margin: 0 10px;
}
.step-connector.done { background: var(--tci-gold); }

@media (max-width: 600px) {
    .step-item .label { display: none; }
}

/* ============ FORM GRID ============ */
.tci-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}
.tci-form .row-full { grid-column: 1 / -1; }

.field { position: relative; }
.field label.fl {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--tci-text);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.field label.fl .req { color: var(--tci-err); }
.field label.fl .opt {
    color: var(--tci-muted);
    font-weight: 500;
    text-transform: none;
    letter-spacing: 0;
    font-size: 11px;
    margin-left: 4px;
}

/* ============ HONEYPOT (anti-bot, never visible to humans) ============ */
.tci-honeypot {
    position: absolute !important;
    left: -10000px !important;
    top: auto !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}
.field input,
.field select,
.field textarea {
    width: 100%;
    padding: 10px 14px;
    font-size: 14px;
    font-family: inherit;
    border: 1px solid #E0E5EB;
    border-radius: 16px;
    background: var(--tci-card);
    color: var(--tci-text);
    outline: 0;
    transition: border .15s, box-shadow .15s;
}
.field input::placeholder,
.field textarea::placeholder {
    color: #9aa1ad;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
    border-color: var(--tci-blue);
    box-shadow: 0 0 0 3px rgba(24,144,215,.12);
}
.field textarea { min-height: 80px; resize: vertical; }
.field .err {
    display: block;
    color: var(--tci-err);
    font-size: 12px;
    margin-top: 5px;
}
.field.invalid input,
.field.invalid select,
.field.invalid textarea {
    border-color: var(--tci-err);
}

/* ============ BUTTONS / FOOTER ============ */
.form-foot {
    grid-column: 1 / -1;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 14px;
    flex-wrap: wrap;
    gap: 10px;
}
.form-foot .note {
    color: var(--tci-muted);
    font-size: 12px;
}
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    border-radius: 6px;
    border: 1px solid var(--tci-border);
    background: var(--tci-card);
    color: var(--tci-text);
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all .15s;
}
.btn:hover { background: #f5f7fb; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.primary {
    background: var(--tci-blue);
    border-color: var(--tci-blue);
    color: #fff;
}
.btn.primary:hover:not(:disabled) {
    background: var(--tci-blue-dark);
    border-color: var(--tci-blue-dark);
}
.btn.gold {
    background: var(--tci-gold);
    border-color: var(--tci-gold);
    color: var(--tci-dark);
}
.btn.gold:hover:not(:disabled) {
    background: var(--tci-gold-dark);
    border-color: var(--tci-gold-dark);
}
.btn.ghost {
    background: transparent;
    color: var(--tci-text);
}

/* ============ OTP BLOCK ============ */
.otp-block {
    grid-column: 1 / -1;
    background: var(--tci-blue-light);
    border: 1px solid #c9e3f5;
    border-radius: 8px;
    padding: 18px 20px;
    margin-top: 6px;
}
.otp-block .otp-title {
    font-weight: 700;
    margin-bottom: 4px;
}
.otp-block .otp-sub {
    color: var(--tci-muted);
    font-size: 13px;
    margin-bottom: 14px;
}
.otp-row {
    display: flex; gap: 10px; align-items: stretch; flex-wrap: wrap;
}
.otp-row input {
    flex: 1;
    min-width: 180px;
    padding: 12px 14px;
    border: 1px solid var(--tci-border);
    border-radius: 6px;
    font-size: 16px;
    font-family: inherit;
    letter-spacing: 6px;
    text-align: center;
    background: #fff;
    outline: 0;
}
.otp-row input:focus {
    border-color: var(--tci-blue);
    box-shadow: 0 0 0 3px rgba(24,144,215,.14);
}
.otp-msg {
    margin-top: 10px;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.otp-msg.ok  { color: var(--tci-ok); }
.otp-msg.err { color: var(--tci-err); }

/* ============ THANK YOU ============ */
.thank-card {
    background: var(--tci-card);
    border: 1px solid var(--tci-border);
    border-radius: 12px;
    padding: 48px 32px;
    text-align: center;
    max-width: 560px;
    margin: 0 auto;
    box-shadow: 0 4px 18px rgba(16,24,40,.06);
}
.thank-icon {
    width: 72px; height: 72px;
    margin: 0 auto 18px;
    border-radius: 50%;
    background: var(--tci-ok-bg);
    color: var(--tci-ok);
    display: flex; align-items: center; justify-content: center;
}
.thank-card h2 {
    font-size: 26px;
    font-weight: 700;
    margin: 0 0 8px;
    letter-spacing: -0.3px;
}
.thank-card p {
    color: var(--tci-muted);
    font-size: 14.5px;
    line-height: 1.6;
    margin: 0 0 22px;
}
.thank-meta {
    background: var(--tci-blue-light);
    border-radius: 8px;
    padding: 12px 16px;
    color: var(--tci-text);
    font-size: 13px;
    margin-bottom: 22px;
    display: inline-block;
}
.thank-meta strong { color: var(--tci-blue-dark); }

.thank-email {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: #fffbeb;
    border: 1px solid #fde68a;
    color: #78350f;
    border-radius: 8px;
    padding: 12px 14px;
    text-align: left;
    font-size: 13.5px;
    line-height: 1.5;
    margin: 0 auto 18px;
    max-width: 480px;
}
.thank-email svg { color: var(--tci-gold-dark); flex-shrink: 0; margin-top: 2px; }
.thank-email strong { color: #1a1f36; }

.thank-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 6px;
}

/* ============ LOADER: TOP PROGRESS BAR ============ */
/* Livewire toggles `display` for elements with wire:loading.
   Default `display:none` is handled by Livewire when idle. */
.tci-progress {
    position: fixed;
    top: 0; left: 0;
    height: 3px;
    width: 100%;
    background: rgba(24,144,215,.08);
    z-index: 9999;
    pointer-events: none;
    overflow: hidden;
}
.tci-progress::before {
    content: '';
    display: block;
    height: 100%;
    width: 40%;
    background: linear-gradient(90deg, var(--tci-blue) 0%, var(--tci-gold) 100%);
    border-radius: 0 3px 3px 0;
    animation: tci-progress-slide 1.1s ease-in-out infinite;
}
@keyframes tci-progress-slide {
    0%   { margin-left: -40%; }
    100% { margin-left: 100%; }
}

/* Dim the host slightly while a request is in flight */
.tci-form-host {
    transition: opacity .15s ease;
}
.tci-form-host--busy { opacity: .85; }

/* ============ LOADER: INLINE BUTTON SPINNER ============ */
.btn-loading {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.spinner {
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255,255,255,.35);
    border-top-color: #fff;
    border-radius: 50%;
    display: inline-block;
    animation: tci-spin .7s linear infinite;
}
.spinner.spinner-dark {
    border-color: rgba(27,30,52,.18);
    border-top-color: var(--tci-dark);
}
@keyframes tci-spin {
    to { transform: rotate(360deg); }
}

/* ============ STEP PANEL FADE-IN ============ */
.step-panel {
    animation: tci-fade-in .22s ease-out both;
}
@keyframes tci-fade-in {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ============ FULL-WIDTH BUTTON HELPER ============ */
.btn.block {
    width: 100%;
    justify-content: center;
}

/* ============ ACCESSIBILITY ============ */
@media (prefers-reduced-motion: reduce) {
    .tci-progress::before,
    .spinner,
    .step-panel {
        animation: none !important;
    }
}

/* ============ RESPONSIVE ============ */
@media (max-width: 720px) {
    .tci-form { grid-template-columns: 1fr; }
    .tci-form-host { padding: 120px 14px 48px; }
    .tci-form-host h1.heading { font-size: 22px; }
    .form-foot { flex-direction: column-reverse; align-items: stretch; }
    .form-foot .btn { justify-content: center; }
    .form-foot .note { text-align: center; }
}
