/* ===================================================
   Truck Insurance Form — Frontend CSS
   =================================================== */

.tif-wrapper {
    max-width: 680px;
    margin: 0 auto;
    padding: 32px;
    background: #fff;
    border: 1px solid #dde3ea;
    border-radius: 14px;
    font-family: 'Segoe UI', Arial, sans-serif;
    color: #1a1a1a;
    box-shadow: 0 2px 16px rgba(0,0,0,0.06);
}

.tif-main-title {
    font-size: 22px;
    font-weight: 700;
    color: #1a3a5c;
    margin: 0 0 26px;
    text-align: center;
}

/* ---- Progress ---- */
.tif-progress-wrap { margin-bottom: 30px; }

.tif-step-labels {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.tif-step-dot {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    flex: 1;
}

.tif-dot {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid #ddd;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    color: #bbb;
    transition: all 0.3s;
}
.tif-dot.tif-active { border-color: #1a3a5c; background: #1a3a5c; color: #fff; box-shadow: 0 0 0 4px rgba(26,58,92,.12); }
.tif-dot.tif-done   { border-color: #0a7c4a; background: #0a7c4a; color: #fff; }

.tif-dot-label { font-size: 10px; color: #aaa; text-align: center; font-weight: 500; }
.tif-dot.tif-active ~ .tif-dot-label { color: #1a3a5c; font-weight: 700; }
.tif-dot.tif-done  ~ .tif-dot-label  { color: #0a7c4a; }

.tif-bar-track { height: 5px; background: #eee; border-radius: 3px; overflow: hidden; margin-bottom: 10px; }
.tif-bar-fill  { height: 5px; background: linear-gradient(90deg,#1a3a5c,#0a7c4a); border-radius: 3px; width: 14.28%; transition: width 0.4s ease; }

.tif-step-status { font-size: 12px; color: #888; text-align: center; font-weight: 500; }

/* ---- Step headings ---- */
.tif-step-title { font-size: 18px; font-weight: 700; color: #1a1a2e; margin: 0 0 4px; }
.tif-step-sub   { font-size: 13px; color: #888; margin: 0 0 20px; }

/* ---- Divider ---- */
.tif-divider {
    position: relative;
    text-align: center;
    margin: 20px 0 16px;
}
.tif-divider::before {
    content: '';
    position: absolute;
    left: 0; right: 0; top: 50%;
    height: 1px;
    background: #e5e9ed;
}
.tif-divider span {
    position: relative;
    background: #fff;
    padding: 0 14px;
    font-size: 11px;
    font-weight: 700;
    color: #1a3a5c;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ---- Fields ---- */
.tif-field { margin-bottom: 16px; }
.tif-field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #444;
    margin-bottom: 6px;
}
.tif-field label small { font-weight: 400; color: #999; }
.tif-req { color: #c0392b; margin-left: 2px; }

.tif-field input[type="text"],
.tif-field input[type="email"],
.tif-field input[type="tel"],
.tif-field input[type="number"],
.tif-field input[type="date"],
.tif-field select,
.tif-field textarea {
    width: 100%;
    padding: 10px 14px;
    font-size: 14px;
    border: 1px solid #d0d7df;
    border-radius: 8px;
    background: #fafbfc;
    color: #1a1a1a;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
    box-sizing: border-box;
}
.tif-field input:focus,
.tif-field select:focus,
.tif-field textarea:focus {
    border-color: #1a3a5c;
    box-shadow: 0 0 0 3px rgba(26,58,92,.1);
    background: #fff;
}
.tif-field textarea { resize: vertical; min-height: 85px; }
.tif-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* ---- Radio Cards ---- */
.tif-radio-grid {
    display: grid;
    grid-template-columns: repeat(3,1fr);
    gap: 10px;
}
.tif-radio-card {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border: 1px solid #dde3ea;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s;
    background: #fafbfc;
    user-select: none;
}
.tif-radio-card:hover { border-color: #1a3a5c; background: #f0f5fa; }
.tif-radio-card input[type="radio"] { accent-color: #1a3a5c; width: 15px; height: 15px; flex-shrink: 0; }
.tif-radio-card:has(input:checked) { border-color: #1a3a5c; background: #eef3f8; color: #1a3a5c; font-weight: 700; }

/* ---- Upload Box ---- */
.tif-upload-box {
    border: 2px dashed #ccd4dc;
    border-radius: 10px;
    background: #fafbfc;
    transition: border-color 0.2s;
    overflow: hidden;
}
.tif-upload-box:hover { border-color: #1a3a5c; }
.tif-file-input { display: none; }
.tif-upload-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 22px 16px;
    cursor: pointer;
    text-align: center;
    font-size: 13px;
    color: #666;
}
.tif-upload-lg .tif-upload-label { padding: 32px 16px; }
.tif-upload-icon { font-size: 30px; color: #1a3a5c; line-height: 1; }
.tif-upload-label small { font-size: 11px; color: #aaa; }
.tif-file-list { padding: 0 14px 8px; }
.tif-file-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    padding: 5px 0;
    border-top: 1px solid #eee;
    color: #555;
}

/* ---- Info Box ---- */
.tif-info-box {
    background: #f0f7ff;
    border: 1px solid #b6d4f0;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 13px;
    color: #1a3a5c;
    margin-top: 16px;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

/* ---- Review Box ---- */
.tif-review-box {
    background: #f6f8fa;
    border: 1px solid #dde3ea;
    border-radius: 10px;
    padding: 16px 20px;
    margin-top: 24px;
}
.tif-review-box h4 { font-size: 13px; font-weight: 700; color: #1a3a5c; margin: 0 0 14px; text-transform: uppercase; letter-spacing: .5px; }
.tif-rv-section { margin-bottom: 12px; }
.tif-rv-section h5 { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: #1a3a5c; margin: 0 0 6px; }
.tif-rv-row { display: flex; justify-content: space-between; font-size: 12px; padding: 3px 0; border-bottom: 1px dashed #e5e5e5; }
.tif-rv-row:last-child { border: none; }
.tif-rv-label { color: #999; }
.tif-rv-val { font-weight: 600; color: #1a1a1a; text-align: right; max-width: 60%; word-break: break-word; }

/* ---- Errors ---- */
.tif-error { display: none; font-size: 12px; color: #c0392b; margin-top: 4px; }
.tif-error.tif-show { display: block; }

/* ---- Buttons ---- */
.tif-btn-row { display: flex; justify-content: space-between; gap: 10px; margin-top: 28px; }
.tif-btn {
    padding: 12px 28px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    border: 1px solid;
    transition: all 0.2s;
    font-family: inherit;
    line-height: 1;
}
.tif-btn-back   { background: transparent; border-color: #ccc; color: #666; }
.tif-btn-back:hover { background: #f5f5f5; }
.tif-btn-next   { background: #1a3a5c; border-color: #1a3a5c; color: #fff; margin-left: auto; }
.tif-btn-next:hover { background: #0f2640; }
.tif-btn-submit { background: #0a7c4a; border-color: #0a7c4a; color: #fff; margin-left: auto; }
.tif-btn-submit:hover { background: #075e38; }
.tif-btn:disabled { opacity: .5; cursor: not-allowed; }

/* ---- Success ---- */
.tif-success { text-align: center; padding: 52px 20px; }
.tif-success-icon {
    width: 68px; height: 68px;
    border-radius: 50%;
    background: #e6f7ef;
    color: #0a7c4a;
    font-size: 32px; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 18px;
}
.tif-success h3 { font-size: 20px; color: #0a7c4a; margin: 0 0 8px; }
.tif-success p  { color: #888; font-size: 14px; margin: 0; }

/* ---- Loader ---- */
.tif-loader { text-align: center; padding: 40px; }
.tif-spinner {
    width: 38px; height: 38px;
    border: 3px solid #eee;
    border-top-color: #1a3a5c;
    border-radius: 50%;
    animation: tif-spin .8s linear infinite;
    margin: 0 auto 14px;
}
@keyframes tif-spin { to { transform: rotate(360deg); } }
.tif-loader p { color: #888; font-size: 14px; margin: 0; }

/* ---- Responsive ---- */
@media (max-width: 560px) {
    .tif-wrapper  { padding: 18px 14px; }
    .tif-row-2    { grid-template-columns: 1fr; }
    .tif-radio-grid { grid-template-columns: 1fr 1fr; }
    .tif-dot      { width: 26px; height: 26px; font-size: 10px; }
    .tif-dot-label { font-size: 9px; }
    .tif-main-title { font-size: 18px; }
}
