/* =========================================================================
   Wizard refresh (proposal, maintenance, quick reference and ContiConnect wizards)
   Scoped under html.ui-refresh. The page frame (header, steps, pager) and the
   Contact Information step (#tab1) are restyled; the inside of the other steps is left as is.
   Tokens, fonts, buttons and the entrance animation come from refresh-base.css
   ========================================================================= */

/* Opaque: on small screens the content slides over the sidebar */
html.ui-refresh .content-wrap,
html.ui-refresh .content { background-color: var(--dr-bg); }
@media (max-width: 767px) {
    html.ui-refresh main#content.content { padding: 68px 16px 24px; }
}
html.ui-refresh .content > footer { color: var(--dr-muted); font-size: 12px; font-family: var(--dr-font); padding: 8px 0 24px; }

/* ---------- Header ---------- */
.wr-head { margin: 0 0 22px; font-family: var(--dr-font); }
.wr-head h1 { margin: 0; font-size: 34px; font-weight: 500; letter-spacing: -.01em; line-height: 1.15; color: var(--dr-ink); font-family: var(--dr-font); }
.wr-sub { margin: 8px 0 0; font-size: 16px; font-weight: 400; color: var(--dr-ink-2); font-family: var(--dr-font) !important; }
.wr-head .dr-eyebrow { margin: 0 0 6px; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--dr-muted); font-family: var(--dr-font) !important; }
.wr-head [data-wr-step] { color: var(--dr-ink); }

/* ---------- Outer frame: no card, the pieces inside are the cards ---------- */
html.ui-refresh .content > .row > .col-md-12 > section.widget.widget-mobile { background: transparent; box-shadow: none; padding: 0; margin: 0; border: 0; }
html.ui-refresh .content > .row > .col-md-12 > section.widget.widget-mobile > header { display: none; }
html.ui-refresh .form-wizard .tab-content { background: transparent; }
html.ui-refresh .form-wizard .tab-content > .tab-pane,
html.ui-refresh .form-wizard .tab-pane.bg-gray-lighter { background: transparent !important; padding: 0; border-radius: 0; }

/* Steps change rarely, so a short fade-up helps show that the content changed */
html.ui-refresh .form-wizard .tab-content > .tab-pane.active { animation: wrPaneIn 280ms var(--dr-ease); }
@keyframes wrPaneIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------- Stepper ---------- */
html.ui-refresh #wizard > ul.tab_mobile {
    display: flex; list-style: none; margin: 0 0 22px; padding: 22px 18px 18px;
    background: var(--dr-surface); border-radius: var(--dr-radius); border: 1px solid rgba(22, 22, 26, .04); box-shadow: var(--dr-shadow);
    font-family: var(--dr-font);
}
html.ui-refresh #wizard > ul.tab_mobile > li { flex: 1 1 0; display: block; position: relative; padding: 0 4px; float: none; }
/* connector between circles */
html.ui-refresh #wizard > ul.tab_mobile > li:before {
    content: ""; position: absolute; top: 17px; right: 50%; width: 100%; height: 2px; background: var(--dr-line);
}
html.ui-refresh #wizard > ul.tab_mobile > li:first-child:before { display: none; }
html.ui-refresh #wizard > ul.tab_mobile > li:after {
    content: ""; position: absolute; top: 17px; right: 50%; width: 100%; height: 2px; background: var(--dr-ink);
    transform-origin: left center; transform: scaleX(0); transition: transform 450ms var(--dr-ease);
}
html.ui-refresh #wizard > ul.tab_mobile > li:first-child:after { display: none; }
html.ui-refresh #wizard > ul.tab_mobile > li.wr-past:after,
html.ui-refresh #wizard > ul.tab_mobile > li.active:after { transform: scaleX(1); }

html.ui-refresh #wizard > ul.tab_mobile > li > a {
    position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 8px;
    padding: 0; margin: 0; background: none !important; border: 0; color: var(--dr-muted); text-decoration: none; cursor: pointer;
    font-size: 13px; line-height: 1.3; text-align: center;
}
html.ui-refresh #wizard > ul.tab_mobile > li > a > small {
    width: 36px; height: 36px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
    background: var(--dr-surface); border: 2px solid var(--dr-line); color: var(--dr-ink-2);
    font-size: 14px; font-weight: 500; font-variant-numeric: tabular-nums;
    transition: background-color 250ms ease, border-color 250ms ease, color 250ms ease, box-shadow 250ms ease;
}
html.ui-refresh #wizard > ul.tab_mobile > li > a > small > span { display: none; }
html.ui-refresh #wizard > ul.tab_mobile > li > a > span { transition: color 200ms ease; }
html.ui-refresh #wizard > ul.tab_mobile > li.active > a { color: var(--dr-ink); font-weight: 500; }
html.ui-refresh #wizard > ul.tab_mobile > li.active > a > small {
    background: var(--dr-accent); border-color: var(--dr-accent); color: var(--dr-ink); box-shadow: 0 0 0 6px var(--dr-accent-soft);
}
html.ui-refresh #wizard > ul.tab_mobile > li.wr-past > a { color: var(--dr-ink-2); }
html.ui-refresh #wizard > ul.tab_mobile > li.wr-past > a > small { background: var(--dr-ink); border-color: var(--dr-ink); color: transparent; font-size: 0; }
html.ui-refresh #wizard > ul.tab_mobile > li.wr-past > a > small:after { content: "\f00c"; font-family: FontAwesome; font-size: 13px; color: #fff; }
@media (hover: hover) and (pointer: fine) {
    html.ui-refresh #wizard > ul.tab_mobile > li:not(.active) > a:hover { color: var(--dr-ink); }
    html.ui-refresh #wizard > ul.tab_mobile > li:not(.active):not(.wr-past) > a:hover > small { border-color: #d3d1ca; }
}
/* the progress bar is replaced by the connectors */
html.ui-refresh #wizard > #bar { display: none; }
html.ui-refresh #title-mobile { font-family: var(--dr-font); font-weight: 500; color: var(--dr-ink); margin: 0 0 14px; }
@media (max-width: 767px) {
    html.ui-refresh #wizard > ul.tab_mobile { padding: 16px 10px; }
    html.ui-refresh #wizard > ul.tab_mobile > li > a > span { display: none; }
    html.ui-refresh #wizard > ul.tab_mobile > li > a > small { width: 30px; height: 30px; font-size: 13px; }
    html.ui-refresh #wizard > ul.tab_mobile > li:before, html.ui-refresh #wizard > ul.tab_mobile > li:after { top: 14px; }
}

/* ---------- Pager (Previous / Next / Export): floating action bar ---------- */
html.ui-refresh #wizard > ul.pager.wizard {
    position: sticky; bottom: 16px; z-index: 30; display: flex; justify-content: space-between; align-items: center;
    margin: 22px 0 0; padding: 10px; list-style: none;
    background: rgba(255, 255, 255, .82); -webkit-backdrop-filter: saturate(1.4) blur(12px); backdrop-filter: saturate(1.4) blur(12px);
    border-radius: 999px; border: 1px solid rgba(22, 22, 26, .06); box-shadow: var(--dr-shadow);
}
html.ui-refresh #wizard > ul.pager.wizard:empty { display: none; }
html.ui-refresh #wizard > ul.pager.wizard > li { display: block; }
html.ui-refresh #wizard > ul.pager.wizard > li.next, html.ui-refresh #wizard > ul.pager.wizard > li.finish { margin-left: auto; }
html.ui-refresh #wizard > ul.pager.wizard .btn {
    float: none !important; height: 42px; padding: 0 22px; border-radius: 999px; border: 1px solid transparent;
    font-family: var(--dr-font); font-size: 14px; font-weight: 500; box-shadow: none; text-shadow: none;
    transition: transform 160ms var(--dr-ease), background-color 200ms ease, border-color 200ms ease, box-shadow 200ms ease;
}
html.ui-refresh #wizard > ul.pager.wizard .btn:active { transform: scale(.97); }
html.ui-refresh #wizard > ul.pager.wizard .previous .btn { background: var(--dr-surface); color: var(--dr-ink); border-color: var(--dr-line); }
html.ui-refresh #wizard > ul.pager.wizard .next .btn { background: var(--dr-accent); color: var(--dr-ink); box-shadow: 0 6px 16px -8px rgba(232, 138, 0, .8); }
html.ui-refresh #wizard > ul.pager.wizard .finish .btn { background: var(--dr-ink); color: #fff; }
html.ui-refresh #wizard > ul.pager.wizard > li.disabled > .btn { opacity: .4; }
@media (hover: hover) and (pointer: fine) {
    html.ui-refresh #wizard > ul.pager.wizard .previous .btn:hover { background: var(--dr-surface-2); border-color: #d9d7d0; }
    html.ui-refresh #wizard > ul.pager.wizard .next .btn:hover { background: #ffb22e; }
    html.ui-refresh #wizard > ul.pager.wizard .finish .btn:hover { background: #2a2a30; }
}

/* =========================================================================
   Step 1: Contact Information
   ========================================================================= */
html.ui-refresh #tab1, html.ui-refresh #tab1 p, html.ui-refresh #tab1 h3, html.ui-refresh #tab1 legend,
html.ui-refresh #tab1 label, html.ui-refresh #tab1 .btn, html.ui-refresh #tab1 .form-control { font-family: var(--dr-font) !important; }

html.ui-refresh #tab1 section.widget {
    position: relative; background: var(--dr-surface); border-radius: var(--dr-radius); border: 1px solid rgba(22, 22, 26, .04);
    box-shadow: var(--dr-shadow); padding: 24px 26px 10px; margin-bottom: 22px;
}
html.ui-refresh #tab1 section.widget > header { padding: 0; margin: 0 0 4px; }
html.ui-refresh #tab1 section.widget > header h3 { margin: 0; font-size: 19px; font-weight: 500; color: var(--dr-ink); }
html.ui-refresh #tab1 .widget-body { padding: 0; }
html.ui-refresh #tab1 .widget-controls { top: 22px; right: 20px; }
html.ui-refresh #tab1 .widget-controls a { color: var(--dr-muted); width: 30px; height: 30px; display: inline-flex; align-items: center; justify-content: center; border-radius: 8px; transition: background-color 150ms ease, color 150ms ease; }
html.ui-refresh #tab1 .widget-controls a:hover { background: #f1f0ec; color: var(--dr-ink); }

html.ui-refresh #tab1 fieldset { margin: 0; }
html.ui-refresh #tab1 legend {
    margin: 18px 0 14px; padding: 0 0 10px; border-bottom: 1px solid var(--dr-line);
    font-size: 12px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--dr-muted);
}
html.ui-refresh #tab1 .wr-note { display: block; margin: -6px 0 14px; font-size: 12px; color: var(--dr-muted); }
html.ui-refresh #tab1 .wr-note .fa { margin-right: 4px; }

html.ui-refresh #tab1 .form-group { margin-bottom: 14px; }
html.ui-refresh #tab1 .control-label { padding-top: 11px; font-size: 13px; font-weight: 400; color: #000; }
html.ui-refresh #tab1 .form-control {
    height: 42px; padding: 0 14px; border-radius: var(--dr-radius-sm); border: 1px solid #e3e1db; background: var(--dr-surface);
    box-shadow: none; color: var(--dr-ink); font-size: 14px;
    transition: border-color 150ms ease, box-shadow 150ms ease, background-color 150ms ease;
}
html.ui-refresh #tab1 .form-control:hover { border-color: #d3d1ca; }
html.ui-refresh #tab1 .form-control:focus { border-color: var(--dr-accent-mark); box-shadow: 0 0 0 4px rgba(255, 165, 0, .18); outline: 0; }
/* Fields filled from the CRM: read-only look, not "broken" */
html.ui-refresh #tab1 .form-control[disabled], html.ui-refresh #tab1 .form-control.disabled {
    background: var(--dr-bg); border-color: transparent; color: var(--dr-ink-2); cursor: default; opacity: 1;
}
html.ui-refresh #tab1 .form-control.wr-filled { animation: wrFilled 900ms ease-out; }
@keyframes wrFilled { from { background-color: var(--dr-accent-soft); } to { background-color: var(--dr-bg); } }

/* CRM search button */
html.ui-refresh #tab1 #search_fleet {
    height: 42px; border-radius: 999px; border: 0; background: var(--dr-ink); color: #fff; font-weight: 500; font-size: 14px;
    box-shadow: 0 6px 16px -10px rgba(22, 22, 26, .7);
    transition: transform 160ms var(--dr-ease), background-color 200ms ease;
}
html.ui-refresh #tab1 #search_fleet:active { transform: scale(.97); }
@media (hover: hover) and (pointer: fine) { html.ui-refresh #tab1 #search_fleet:hover { background: #2a2a30; } }

/* File pickers */
html.ui-refresh #tab1 .fileinput.input-group { display: flex; width: 100%; }
html.ui-refresh #tab1 .fileinput .form-control { flex: 1; border-radius: var(--dr-radius-sm) 0 0 var(--dr-radius-sm); display: flex; align-items: center; overflow: hidden; }
html.ui-refresh #tab1 .fileinput .input-group-addon {
    width: auto; display: flex; align-items: center; padding: 0 16px; border: 1px solid #e3e1db; border-left: 0;
    background: var(--dr-surface-2); color: var(--dr-ink); font-size: 13px; font-weight: 500; transition: background-color 150ms ease;
}
html.ui-refresh #tab1 .fileinput .input-group-addon:last-child { border-radius: 0 var(--dr-radius-sm) var(--dr-radius-sm) 0; }
html.ui-refresh #tab1 .fileinput.fileinput-new .btn-file { border-radius: 0 var(--dr-radius-sm) var(--dr-radius-sm) 0; }
html.ui-refresh #tab1 .fileinput .input-group-addon:hover { background: #f1f0ec; }
/* keep the plugin's new/exists states (our display:flex must not show both) */
html.ui-refresh #tab1 .fileinput.fileinput-new .fileinput-exists,
html.ui-refresh #tab1 .fileinput.fileinput-exists .fileinput-new { display: none !important; }
html.ui-refresh #tab1 .help-block { font-size: 12px; color: var(--dr-muted); margin-top: 6px; }

/* Bootstrap-select (Select User): the wrapper carries .form-control, only the button gets the input look */
html.ui-refresh #tab1 .bootstrap-select.form-control { height: auto; padding: 0; border: 0; background: transparent; box-shadow: none; }
html.ui-refresh #tab1 .bootstrap-select > .btn {
    height: 42px; border-radius: var(--dr-radius-sm); border: 1px solid #e3e1db; background: var(--dr-surface); box-shadow: none;
    color: var(--dr-ink); font-size: 14px; transition: border-color 150ms ease, box-shadow 150ms ease;
}
html.ui-refresh #tab1 .bootstrap-select.open > .btn, html.ui-refresh #tab1 .bootstrap-select > .btn:focus { border-color: var(--dr-accent-mark); box-shadow: 0 0 0 4px rgba(255, 165, 0, .18); outline: 0 !important; }
html.ui-refresh #tab1 .bootstrap-select .dropdown-menu { border-radius: 12px; border: 1px solid var(--dr-line); box-shadow: var(--dr-shadow-hover); padding: 6px; transform-origin: top center; animation: wrMenuIn 160ms var(--dr-ease); }
html.ui-refresh #tab1 .bootstrap-select .dropdown-menu li a { border-radius: 8px; padding: 8px 10px; }
@keyframes wrMenuIn { from { opacity: 0; transform: translateY(-4px) scale(.98); } to { opacity: 1; transform: none; } }

/* Save (new proposal): floating action bar like the pager */
html.ui-refresh #tab1 .form-actions {
    position: sticky; bottom: 16px; z-index: 30; margin: 4px 0 0; padding: 10px; border: 1px solid rgba(22, 22, 26, .06); border-radius: 999px;
    background: rgba(255, 255, 255, .82); -webkit-backdrop-filter: saturate(1.4) blur(12px); backdrop-filter: saturate(1.4) blur(12px); box-shadow: var(--dr-shadow);
}
html.ui-refresh #tab1 .form-actions .row { margin: 0; }
html.ui-refresh #tab1 .form-actions .col-md-12 { display: flex; justify-content: flex-end; padding: 0; }
html.ui-refresh #tab1 .save-data {
    height: 44px; padding: 0 28px; border: 0; border-radius: 999px; background: var(--dr-accent); color: var(--dr-ink);
    font-size: 15px; font-weight: 500; box-shadow: 0 6px 16px -8px rgba(232, 138, 0, .8);
    transition: transform 160ms var(--dr-ease), background-color 200ms ease, box-shadow 200ms ease;
}
html.ui-refresh #tab1 .save-data:active { transform: scale(.97); }
@media (hover: hover) and (pointer: fine) { html.ui-refresh #tab1 .save-data:hover { background: #ffb22e; } }
@media (max-width: 767px) {
    html.ui-refresh #tab1 section.widget { padding: 20px 18px 6px; }
    html.ui-refresh #tab1 .form-actions .col-md-12 { justify-content: stretch; }
    html.ui-refresh #tab1 .save-data { width: 100%; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
    html.ui-refresh .form-wizard .tab-content > .tab-pane.active,
    html.ui-refresh #tab1 .bootstrap-select .dropdown-menu { animation: none; }
    html.ui-refresh #wizard > ul.tab_mobile > li:after { transition: none; }
    html.ui-refresh #wizard > ul.pager.wizard .btn:active, html.ui-refresh #tab1 #search_fleet:active, html.ui-refresh #tab1 .save-data:active { transform: none; }
}
