/* =============================================================================
 * Via Hive Admin - VISUAL QA FIX LAYER (visual QA sweep 2026-10-25, rows A1-A27)
 * -----------------------------------------------------------------------------
 * Loaded after vh2-category-ai.css and before vh2-phone.css (which stays the last stylesheet). Styling and layout only:
 * colours come from the --vh2-* tokens (vh2-tokens.css), never hex literals. D-550 decisions are kept: the green
 * Active / Verified / Payouts-enabled / Email / Phone verified chips and the online dot stay green.
 * ========================================================================== */

/* ---- A2: the TinyMCE 4 toolbar (CMS page editor) draws every icon from the "tinymce" / "tinymce-small" icon fonts
   (skin.min.css). vh2-base.css forces Inter on every .v2-app descendant with !important, and Inter has no glyphs for those
   private-use codepoints, so the toolbar showed stray letters. Same exception as Font Awesome / Glyphicons in vh2-base.css. ---- */
.v2-app .mce-ico { font-family: "tinymce", Arial !important; }
.v2-app .mce-btn-small .mce-ico { font-family: "tinymce-small", Arial !important; }

/* ---- A1: a switch that cannot be used (the server setting is the ceiling) is drawn off, grey and not clickable ---- */
:root body .switch.vh-switch--locked { opacity: .55; cursor: not-allowed; }
:root body .switch.vh-switch--locked .switch-input { cursor: not-allowed; }
:root body .switch.vh-switch--locked .switch-label { background: var(--vh2-bg-sunken) !important; border-color: var(--vh2-border-default) !important; }
:root body .switch.vh-switch--locked .switch-handle { box-shadow: none !important; }
:root body #bgcheck-admin-setting .btn { margin-left: var(--vh2-s2); }

/* ---- A3: a required field shows the red error state only after the operator typed in it or submitted the form
   (tabbing past an empty field on the login screen painted both fields red before anything was entered) ---- */
:root body .form-control.ng-invalid.ng-touched.ng-pristine:not(:focus) {
  border-color: var(--vh2-border-strong) !important; box-shadow: none !important;
}
:root body form.ng-submitted .form-control.ng-invalid {
  border-color: var(--vh2-danger-fg) !important;
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--vh2-danger-fg) 14%, transparent) !important;
}
/* the logo sat directly on the top edge of the login card */
:root body .page-login .text-center:has(> img) { margin-bottom: var(--vh2-s6); }

/* ---- A4: no coloured left stripes on rounded tiles / queue rows (they drew curved bars into the card edge).
   The tile and the row keep a hairline edge; urgency is carried by the coloured number. ---- */
:root body .vhl-stat, :root body .vhl-stat--ok, :root body .vhl-stat--warn, :root body .vhl-stat--bad, :root body .vhl-stat--info { box-shadow: none; }
:root body button.vhl-stat:focus-visible { box-shadow: var(--vh2-focus-glow); }
:root body .vhl-stat--warn .vhl-stat__value { color: var(--vh2-warning-fg); }
:root body .vhl-stat--bad .vhl-stat__value { color: var(--vh2-danger-fg); }
.v2-app .vh2d-queue__row--critical, .v2-app .vh2d-queue__row--warn, .v2-app .vh2d-queue__row--info { box-shadow: none; }
:root body .vhl-page .feature-box-container .card { box-shadow: none !important; }

/* ---- A5: radios are brand orange (a selected date format is a choice, not a success). The legacy skin drew a green
   Font Awesome check inside the circle; it is now a brand ring with a brand dot. Checkboxes of the same skin: brand tick. ---- */
:root body .checkbox-custom-alt input[type="radio"]:checked + i { border-color: var(--vh2-brand) !important; background: var(--vh2-surface) !important; color: var(--vh2-brand) !important; }
:root body .checkbox-custom-alt input[type="radio"]:checked + i::before {
  content: "" !important; top: 4px !important; left: 4px !important; width: 10px !important; height: 10px !important;
  border-radius: 50%; background: var(--vh2-brand) !important;
}
:root body .checkbox-custom-alt input[type="checkbox"]:checked + i { color: var(--vh2-brand) !important; border-color: var(--vh2-brand) !important; }
/* the "Custom" date-format row: the radio, the label, the pattern field and its preview sit on one centred line */
:root body .checkbox-custom-alt:has(> input[type="text"]), :root body .checkbox-custom-alt:has(input[ng-model*="date_format"][type="text"]) { display: flex; align-items: center; gap: var(--vh2-s2); }
:root body .checkbox-custom-alt:has(input[type="text"]) > i { margin-top: -2px !important; flex: 0 0 auto; }
:root body .checkbox-custom-alt:has(input[type="text"]) > div { display: inline-flex !important; align-items: center; gap: var(--vh2-s2); }
:root body .checkbox-custom-alt:has(input[type="text"]) > div > div { float: none !important; padding-top: 0 !important; }
:root body .checkbox-custom-alt:has(input[type="text"]) > div > input { float: none !important; margin: 0 !important; height: var(--vh2-control-h); }

/* ---- A6: Client / Provider detail - one form grid (two equal columns, one left edge) instead of floated columns that
   were not inside a row (Gender / Date of birth were indented 15px, "About" floated beside Gender) ---- */
@media (min-width: 768px) {
  :root body form[name="taskerEditForm"] .wrap-reset, :root body form[name="userEditForm"] .wrap-reset {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--vh2-s5); grid-auto-flow: row dense;
  }
  :root body form[name="taskerEditForm"] .wrap-reset > *, :root body form[name="userEditForm"] .wrap-reset > *,
  :root body form[name="taskerEditForm"] .wrap-reset > .row > *, :root body form[name="userEditForm"] .wrap-reset > .row > * {
    grid-column: 1 / -1; float: none; width: auto; min-width: 0; padding-left: 0; padding-right: 0; margin-left: 0; margin-right: 0;
  }
  :root body form[name="taskerEditForm"] .wrap-reset > .row, :root body form[name="userEditForm"] .wrap-reset > .row { display: contents; }
  /* Bootstrap clearfix pseudo-elements of a display:contents row would become empty grid cells */
  :root body form[name="taskerEditForm"] .wrap-reset::before, :root body form[name="taskerEditForm"] .wrap-reset::after,
  :root body form[name="userEditForm"] .wrap-reset::before, :root body form[name="userEditForm"] .wrap-reset::after,
  :root body form[name="taskerEditForm"] .wrap-reset > .row::before, :root body form[name="taskerEditForm"] .wrap-reset > .row::after,
  :root body form[name="userEditForm"] .wrap-reset > .row::before, :root body form[name="userEditForm"] .wrap-reset > .row::after { display: none; }
  :root body form[name="taskerEditForm"] .wrap-reset .form-group > .form-control, :root body form[name="userEditForm"] .wrap-reset .form-group > .form-control,
  :root body form[name="taskerEditForm"] .wrap-reset .form-group > .input-group, :root body form[name="userEditForm"] .wrap-reset .form-group > .input-group { width: 100%; max-width: none; }
  :root body form[name="taskerEditForm"] .wrap-reset .form-group[class*="col-sm-6"],
  :root body form[name="userEditForm"] .wrap-reset .form-group[class*="col-sm-6"],
  :root body form[name="taskerEditForm"] .wrap-reset > .form-group:has(input[type="email"]),
  :root body form[name="userEditForm"] .wrap-reset > .form-group:has(input[type="email"]),
  :root body form[name="taskerEditForm"] .wrap-reset > .form-group:has(#dob),
  :root body form[name="userEditForm"] .wrap-reset > .form-group:has(#dob) { grid-column: auto; }
}
/* the legend under the tile title repeated it ("Personal Information" / "Account information Settings"): one heading */
:root body form[name="taskerEditForm"] > section.tile:first-child .wrap-reset > .row:first-child > .legend,
:root body form[name="userEditForm"] > section.tile:first-child .wrap-reset > .row:first-child > .legend { display: none; }
/* A27: the legend divider is a solid hairline, not a dotted rule */
:root body .legend, :root body .form-group.legend { border-bottom: 1px solid var(--vh2-border-default) !important; border-bottom-style: solid !important; }
/* "Verified" next to the phone / e-mail field is a STATUS, not an orange primary button: a green verified addon (D-550 keeps
   verified chips green), same height as the field, not clickable */
:root body .input-group-btn > span.btn.btn-success {
  background: var(--vh2-success-bg) !important; background-image: none !important; color: var(--vh2-success-fg) !important;
  border: 1px solid var(--vh2-success-border) !important; box-shadow: none !important; text-shadow: none !important;
  cursor: default; pointer-events: none; font-weight: 600; height: 100%; min-height: var(--vh2-control-h);
  display: inline-flex; align-items: center; gap: 6px; border-radius: 0 var(--vh2-r-md) var(--vh2-r-md) 0 !important;
}
:root body .input-group-btn > span.btn.btn-success::after, :root body .input-group-btn > span.btn.btn-success::before { display: none !important; }

/* ---- A7: Provider detail tabs wrap onto a second line instead of being cut at the right edge ("N...") ---- */
:root body .tabs-dark > .nav-tabs { flex-wrap: wrap; overflow-x: visible; row-gap: var(--vh2-s1); }

/* ---- A8: Bookings - below 1200px the Actions column is no longer pinned over the other columns; the whole table scrolls
   inside its card. The views strip scrolls sideways with a fade at the right edge so a hidden view is visible as "more". ---- */
@media (max-width: 1199px) {
  :root body .vhbk .vhbk-tablecard table.listtable > thead > tr > th:last-child,
  :root body .vhbk .vhbk-tablecard table.listtable > tbody > tr > td:last-child { position: static; box-shadow: none; }
  :root body .vhbk .vhbk-views {
    flex-wrap: nowrap; overflow-x: auto; max-width: 100%; scrollbar-width: thin; padding-right: var(--vh2-s8);
    -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 32px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 32px), transparent);
  }
  :root body .vhbk .vhbk-views a { flex: 0 0 auto; white-space: nowrap; }
}

/* ---- A10: Submit / Publish / Save buttons with the legacy "effect 3c" arrow: the label no longer runs under the arrow ---- */
:root body .btn-ef.btn-ef-3.btn-ef-3c { width: auto; padding-left: var(--vh2-s5) !important; padding-right: var(--vh2-s5) !important; overflow: visible; display: inline-flex; align-items: center; gap: var(--vh2-s2); }
:root body .btn-ef.btn-ef-3.btn-ef-3c > i { position: static; width: auto; height: auto; line-height: inherit; font-size: 12px; margin: 0; }
:root body .btn-ef.btn-ef-3.btn-ef-3c::after { display: none; }

/* ---- A11: Reconciliation / Provider summary / Booking summary use the same page padding and header as every other page ---- */
:root body .vh-recon, :root body .vh-psum, :root body .vh-bsum { padding: 20px; }
:root body .vh-recon > .pageheader h2 > .fa, :root body .vh-psum > .pageheader h2 > .fa, :root body .vh-bsum > .pageheader h2 > .fa { display: none; }

/* ---- A14: General settings - one 4-column grid (2 on tablets); each switch sits on its label row ---- */
@media (min-width: 768px) {
  :root body form[name="generalSettingsForm"] .form-group-1 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 var(--vh2-s5); }
  :root body form[name="generalSettingsForm"] .form-group-1 > .form-group-two { display: contents; }
  :root body form[name="generalSettingsForm"] .form-group-1::before, :root body form[name="generalSettingsForm"] .form-group-1::after,
  :root body form[name="generalSettingsForm"] .form-group-1 > .form-group-two::before, :root body form[name="generalSettingsForm"] .form-group-1 > .form-group-two::after { display: none; }
  :root body form[name="generalSettingsForm"] .form-group-1 .form-group > .form-control { width: 100%; max-width: none; }
  :root body form[name="generalSettingsForm"] .form-group-1 .form-group { width: auto !important; max-width: none; float: none; padding-left: 0; padding-right: 0; margin-left: 0; margin-right: 0; min-width: 0; }
  :root body form[name="generalSettingsForm"] .form-group-1 > .form-group-two > h4 { grid-column: 1 / -1; margin: var(--vh2-s2) 0 var(--vh2-s3); font-size: 16px; font-weight: 700; }
}
@media (min-width: 768px) and (max-width: 1199px) {
  :root body form[name="generalSettingsForm"] .form-group-1 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
:root body form[name="generalSettingsForm"] .form-group-1 .form-group:has(> label.switch) { display: flex; flex-wrap: wrap; align-items: center; column-gap: var(--vh2-s3); align-content: flex-start; }
:root body form[name="generalSettingsForm"] .form-group-1 .form-group:has(> label.switch) > label:not(.switch) { margin: 0; flex: 1 1 0; min-width: 0; }
:root body form[name="generalSettingsForm"] .form-group-1 .form-group:has(> label.switch) > label.switch { flex: 0 0 auto; }
:root body form[name="generalSettingsForm"] .form-group-1 .form-group:has(> label.switch) > label.switch { margin: 0; }
:root body form[name="generalSettingsForm"] .form-group-1 .form-group:has(> label.switch) > :not(label) { flex: 1 1 100%; margin-top: var(--vh2-s2); }
:root body form[name="generalSettingsForm"] .form-group-1 .form-group:has(> label.switch) > p.help-block { margin-top: var(--vh2-s1); }
:root body form[name="generalSettingsForm"] .form-group-1 .form-group:not(:has(> label.switch)) > label { min-height: 30px; display: flex; align-items: center; margin: 0 0 var(--vh2-s2); }
:root body form[name="generalSettingsForm"] .form-group-1 .form-group:has(> label.switch) > label { min-height: 30px; }

/* ---- A20: a Stripe account id / code value is a neutral mono chip (not the Bootstrap pink code style) ---- */
:root body code {
  color: var(--vh2-text-primary); background: var(--vh2-bg-sunken); border: 1px solid var(--vh2-border-default);
  border-radius: var(--vh2-r-xs); padding: 1px 6px; font-family: var(--vh2-font-mono) !important; font-size: 12px;
}

/* ---- A21: the CMS editor frame uses the control hairline token (was #D33200) ---- */
:root body .mce-tinymce.mce-container.mce-panel { border-color: var(--vh2-border-strong) !important; }
:root body .mce-tinymce .mce-edit-area, :root body .mce-tinymce .mce-toolbar-grp, :root body .mce-tinymce .mce-menubar, :root body .mce-tinymce .mce-statusbar { border-color: var(--vh2-border-default) !important; }

/* ---- A22: filter rows - one control height (40px) for selects, date fields and buttons ---- */
:root body .vhl-filters .form-control, :root body .vhl-filters select, :root body .vhl-filters .btn,
:root body .vhbk-filterbar .form-control, :root body .vhbk-filterbar .btn, :root body .vhbk-filterbar .input-group-btn > .btn { height: 40px; min-height: 40px; }
:root body .vhl-filters .btn, :root body .vhbk-filterbar .btn { display: inline-flex; align-items: center; justify-content: center; }

/* ---- A23: the booking reference is shown as stored ("Hive-255270"): tabular figures widened the hyphen into " - " ---- */
:root body .vhbk .vhbk-id__ref, :root body .vhbk .vhbk-cell .vhbk-ref { font-variant-numeric: normal; font-feature-settings: normal; }

/* ---- A25: status badges never wrap onto two lines ---- */
:root body .vh-recon .label, :root body .vh-recon .badge, :root body .vh-recon [class*="chip"], :root body .vh-psum .label, :root body .vh-psum [class*="chip"] { white-space: nowrap; }
:root body .vh-recon .vh-status-raw, :root body #bgcheck-attention td.vh-status-raw { text-transform: capitalize; }

/* ---- A26: native file inputs look like the secondary button + file name ---- */
:root body input[type="file"]::file-selector-button {
  margin-right: var(--vh2-s3); padding: 0 var(--vh2-s4); height: 36px; border-radius: var(--vh2-r-pill);
  border: 1px solid var(--vh2-border-strong); background: var(--vh2-surface); color: var(--vh2-text-primary);
  font: 600 13px var(--vh2-font); cursor: pointer; box-shadow: var(--vh2-shadow-xs);
}
:root body input[type="file"]::file-selector-button:hover { background: var(--vh2-bg-sunken); }
:root body input[type="file"] { font-size: 14px; color: var(--vh2-text-secondary); }

/* ---- A9: phone width - 16px page gutter (the shell, #content and .page each added 16-20px: 52px), the language
   control is a compact globe button instead of a cut word ("Engl"), list search fills the toolbar ---- */
@media (max-width: 767px) {
  html[data-vh2="on"] .vh2-shell__content #content, :root body .vh2-shell__content #content { padding: 0 !important; }
  :root body #content .page, :root body #content .page[class], :root body .vh-recon, :root body .vh-psum, :root body .vh-bsum, :root body .vh2d { padding-left: 0 !important; padding-right: 0 !important; }
  :root body .vh2-topbar__lang {
    width: 40px; min-width: 40px; padding: 0 !important; color: transparent !important; text-shadow: none;
    -webkit-appearance: none; appearance: none; background-position: center !important; background-repeat: no-repeat !important; background-size: 18px 18px !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235F5A55' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M2 12h20'/%3E%3Cpath d='M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z'/%3E%3C/svg%3E") !important;
  }
  :root body .vh2-topbar__lang option { color: var(--vh2-text-primary); }
  :root body custom-table .vhl-toolbar__search, :root body .vhl-toolbar__search { flex: 1 1 100%; width: 100%; max-width: 100%; }
  :root body .vhl-toolbar__search .form-control, :root body .vhl-search .form-control { width: 100%; }
}

/* ---- reconciliation at phone / tablet width: the money-trail table scrolls inside its panel instead of being cut ---- */
@media (max-width: 991px) {
  :root body .vh-recon .panel:has(> .vh-recon-table) { overflow-x: auto !important; -webkit-overflow-scrolling: touch; }
}

/* ---- A18: between 481px and 768px the record search is hidden and the jump search was an EMPTY grey pill (its label was
   display:none): the label shows again, cut with an ellipsis, so the one search entry point is recognisable. ---- */
@media (min-width: 481px) and (max-width: 768px) {
  :root body .vh2-topbar__search span { display: inline; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}
