/* Fomantic UI Theme Overrides */
/* These overrides use CSS variables defined in ThemeRoot.css to customize Fomantic UI colors */

/* Inverted elements - override the default black background */
.ui.inverted.segment,
.ui.inverted.header,
.ui.inverted.menu,
.ui.inverted.button {
  background-color: #425B76 !important;
  color: #FFFFFF !important;
}

/* Ensure text in inverted elements remains readable */
.ui.inverted.segment .header,
.ui.inverted.header,
.ui.inverted.menu .item,
.ui.inverted.button {
  color: #FFFFFF !important;
}

/* Links in inverted elements */
.ui.inverted.segment a,
.ui.inverted.header a,
.ui.inverted.menu a,
.ui.inverted.button a {
  color: #FFFFFF !important;
}

.ui.inverted.segment a:hover,
.ui.inverted.header a:hover,
.ui.inverted.menu a:hover,
.ui.inverted.button a:hover {
  color: rgba(255, 255, 255, 0.8) !important;
}

/* Ensure dropdown menus in inverted headers use light theme for readability */
.ui.inverted.segment .ui.dropdown .menu,
.ui.inverted.header .ui.dropdown .menu {
  background-color: #FFFFFF !important;
  color: #333333 !important;
}

.ui.inverted.segment .ui.dropdown .menu .item,
.ui.inverted.header .ui.dropdown .menu .item,
.ui.inverted.segment .ui.dropdown .menu a.item,
.ui.inverted.header .ui.dropdown .menu a.item {
  color: #333333 !important;
}

.ui.inverted.segment .ui.dropdown .menu .item .icon,
.ui.inverted.header .ui.dropdown .menu .item .icon {
  color: #333333 !important;
}

.ui.inverted.segment .ui.dropdown .menu .item:hover,
.ui.inverted.header .ui.dropdown .menu .item:hover {
  background-color: #f2f2f2 !important;
}

/* Icon-only links (anchors containing icons) should never render underlines/borders */
a > i.icon,
a > span.icon,
a > img.icon {
  text-decoration: none !important;
  border-bottom: none !important;
}

/* Card header content - keep the header color */
.ui.card .content[style*="background-color:lightgray"],
.ui.card .content[style*="background-color: lightgray"] {
  background-color: #477493 !important; /* Card header background */
  color: #FFFFFF !important;
}

/* Card header text */
.ui.card .content[style*="background-color:lightgray"] .header,
.ui.card .content[style*="background-color: lightgray"] .header {
  color: #FFFFFF !important;
}

/* Buttons in headers - match header background color */

/* Primary action buttons in headers and card headers use menubar colors */
.ui.inverted.segment .ui.button,
.ui.inverted.header .ui.button,
.ui.card .content[style*="background-color:lightgray"] .ui.button,
.ui.card .content[style*="background-color: lightgray"] .ui.button {
  background-color: #425B76 !important;
  color: #FFFFFF !important;
  border-color: #425B76 !important;
}

/* Button hover states in headers */
.ui.inverted.segment .ui.button:hover,
.ui.inverted.header .ui.button:hover,
.ui.card .content[style*="background-color:lightgray"] .ui.button:hover,
.ui.card .content[style*="background-color: lightgray"] .ui.button:hover {
  background-color: #425B76 !important;
  border-color: #425B76 !important;
}

/* Standardize primary action buttons across pages (green-outline OK/Cancel/Continue/Log In/Log Out) */
.ui.black.button,
.ui.black.buttons .button {
  background: #425B76 !important;
  color: #FFFFFF !important;
  border: 2px solid #7bc142 !important;
  border-radius: 10px !important;
  box-shadow: none !important;
}

.ui.black.button:hover,
.ui.black.buttons .button:hover,
.ui.black.button:focus,
.ui.black.buttons .button:focus,
.ui.black.button:active,
.ui.black.buttons .button:active {
  background: #425B76 !important;
  border: 2px solid #7bc142 !important;
}

/* Card body content - use Fomantic default background (remove custom background) */
.ui.card .content:not([style*="background-color"]) {
  color: #333333 !important;
}

/* Ensure text in card body content is visible */
.ui.card .content:not([style*="background-color"]) .field,
.ui.card .content:not([style*="background-color"]) .field label,
.ui.card .content:not([style*="background-color"]) p,
.ui.card .content:not([style*="background-color"]) input {
  color: #333333 !important;
}

/* Input elements in card body content - match page background color */
.ui.card .content:not([style*="background-color"]) input,
.ui.card .content:not([style*="background-color"]) select,
.ui.card .content:not([style*="background-color"]) textarea,
.ui.card .content:not([style*="background-color"]) .ui.checkbox input,
.ui.card .content:not([style*="background-color"]) .ui.radio input {
  background-color: #EFFBFF !important;
  border-color: #666666 !important;
  color: #333333 !important;
}

/* Fomantic selection dropdowns in card body content */
.ui.card .content:not([style*="background-color"]) .ui.dropdown.selection {
  border-color: #666666 !important;
  background-color: #EFFBFF !important;
  color: #333333 !important;
}

/* Checkbox visual box interior */
.ui.card .content:not([style*="background-color"]) .ui.checkbox .box:before,
.ui.card .content:not([style*="background-color"]) .ui.checkbox label:before {
  background-color: #EFFBFF !important;
  border-color: #666666 !important;
}

/* Remove placeholder text from input elements */
.ui.card .content:not([style*="background-color"]) input::placeholder,
.ui.card .content:not([style*="background-color"]) textarea::placeholder {
  color: transparent !important;
  opacity: 0 !important;
}

/* Card border styling - change all card borders and dividing lines to #32A0C7 */
.ui.card {
  border: 1px solid #32A0C7 !important;
  border-color: #32A0C7 !important;
}

.ui.card .content {
  border-color: #32A0C7 !important;
  border-top-color: #32A0C7 !important;
  border-bottom-color: #32A0C7 !important;
  border-left: none !important;
  border-right: none !important;
}

.ui.card .divider {
  border-color: #32A0C7 !important;
}

.ui.card .header {
  border-bottom-color: #32A0C7 !important;
}

.ui.card .meta {
  border-top-color: #32A0C7 !important;
}

.ui.card .description {
  border-color: #32A0C7 !important;
}

.ui.card .extra.content {
  border-top: none !important;
}

/* Track buttons container - remove padding to align with card borders */
.tracks .ui.vertical.basic.buttons {
  padding-left: 0 !important;
  padding-right: 0 !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

/* Track buttons in LoginTrack.Smart.aspx */
.tracks .ui.button {
  background-color: #FFFFFF !important;
  color: #333333 !important;
  border-color: #32A0C7 !important;
  border-width: 1px !important;
  border-style: solid !important;
  border-left: none !important; /* Remove left border to align with card */
  border-right: none !important; /* Remove right border to align with card */
  /* Soften top/bottom borders compared to card-side borders */
  border-top-color: rgba(50, 160, 199, 0.20) !important;
  border-bottom-color: rgba(50, 160, 199, 0.20) !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  border-radius: 0 !important; /* Remove rounded corners for clean alignment */
}

/* Track button hover states */
.tracks .ui.button:hover {
  background-color: #f2f2f2 !important; /* Neutral light gray hover */
  border-color: #32A0C7 !important; /* Keep side color same */
  border-top-color: rgba(50, 160, 199, 0.20) !important; /* Keep top lighter */
  border-bottom-color: rgba(50, 160, 199, 0.20) !important; /* Keep bottom lighter */
}

/* Smart layout background / gutter color */
html,
body,
body.pushable,
.pusher,
.pushable > .pusher,
#main {
  background-color: #EFFBFF !important;
}

/* Consistent spacing between header bar and first content on Smart pages */
#menubar {
  margin: 0 !important;
  width: 100% !important; /* ensure full width header */
  background-color: #425B76 !important;
  color: #FFFFFF !important;
  border-color: #425B76 !important;
  padding: 5px 10px !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

#main {
  padding-top: 14px !important; /* global spacing below header */
}

/* When fixed via Fomantic visibility, keep full width and alignment */
#menubar.fixed {
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
}

/* Normalize top gap: remove extra margin from first content so gap = #main padding */
#main > *:first-child { margin-top: 0 !important; }
#main > form:first-child > *:first-child { margin-top: 0 !important; }

/* Prevent menubar title from wrapping so height matches across pages */
#menubar .ui.header { white-space: nowrap; }
#menubar .ui.grid {
  margin: 0 !important;
}
#menubar a {
  text-decoration: none !important;
}

/* Remove extra top margin from the first card under #main (even if hidden inputs precede it) */
#main > .ui.card:first-of-type { margin-top: 0 !important; }
#main > form:first-child > .ui.card:first-of-type { margin-top: 0 !important; }

/* Project-wide table header style matching card header color */
.q-table-header {
  background-color: #477493 !important;
  color: #FFFFFF !important;
  height: 30px !important;
}
.q-table-header > th,
.q-table-header th {
  color: #FFFFFF !important;
}

/* Ensure modal header segments sit flush to top even if added dynamically */
.ui.modal .ui.inverted.basic.segment.overlay {
  margin-top: 0 !important;
}

/* Site-wide horizontal rule styling – lighter brand blue */
hr {
  border: none !important;
  height: 0;
  border-top: 1px solid rgba(50, 160, 199, 0.35) !important; /* #32A0C7 @ 35% */
}

/* Optional variants if needed */
hr.thick { border-top-width: 2px !important; }
hr.light  { border-top-color: rgba(50, 160, 199, 0.20) !important; }
hr.dark   { border-top-color: rgba(50, 160, 199, 0.55) !important; }

/* Accordion dropdown caret icon color override */
.ui.accordion .title .dropdown.icon {
  color: #fa4673 !important;
  font-size: 1.4em !important;
  vertical-align: middle !important;
}

/* Opt-in spacing for grouped buttons - centered with even gaps */
.ui.buttons.spaced { display: inline-flex !important; justify-content: center !important; column-gap: 6px !important; }
.ui.buttons.spaced .button { margin: 0 !important; }

/* Smart pages: darker borders for inputs, dropdowns, and textareas */
#main input:not([type="checkbox"]):not([type="radio"]),
#main select,
#main textarea,
#main .ui.input > input,
#main .ui.dropdown.selection {
  border-color: #666666 !important;
}

/* Match button rounding on inputs and dropdowns */
#main input:not([type="checkbox"]):not([type="radio"]),
#main select,
#main textarea,
#main .ui.input > input,
#main .ui.dropdown.selection {
  border-radius: 6px !important;
}

/* Utility: Primary action text color (matches primary/inverted button background) */
.q-primary-text,
td.q-primary-text,
.q-primary-text * {
  color: #425b76 !important;
  font-weight: bold !important;
}

/* Utility: Compact variant for mini buttons (reduced padding) */
.ui.mini.button.q-compact,
.ui.mini.buttons .button.q-compact {
  padding: 0.5em 0.6em !important;
  border-radius: 8px !important;
}

/* Card headers: standard header background with white text */
.q-card-header {
  background-color: #477493 !important;
  color: #FFFFFF !important;
}
.q-card-header .header {
  color: #FFFFFF !important;
}

/* Modal close icon: allow forcing red color even with modal defaults */
.ui.modal > i.close.icon.red {
  color: #db2828 !important;
}

/* Force red close icon specifically for Set Areas modal */
#modalSetAreas > i.close.icon,
#modalSetAreas > i.close.icon:before {
  color: #db2828 !important;
}

/* Ensure image-based close icons render square and unsquashed in modals */
.ui.modal > img.close.icon {
  width: 2.0em !important;
  height: 2.0em !important;
  object-fit: contain !important;
  opacity: 1 !important;           /* avoid default .close.icon opacity */
  filter: none !important;          /* prevent accidental filters muting whites */
  -webkit-filter: none !important;
  mix-blend-mode: normal !important;/* ensure no blending with modal bg */
  padding-bottom: 7px !important;
}

/* in Q/Content/FomanticOverrides.css */
.assignAccordion .content > table.clsAssnTable {
  width: 92% !important;
  margin-left: 20px;
  /* optional if content is forcing it wider: */
  /* table-layout: fixed; */
}

.ui.modal,
.ui.scrolling.modal,
.ui.fullscreen.modal {
  background: #EFFBFF !important;
  padding: 0 !important;
  width: 100% !important;
  height: 100% !important;
  top: 0 !important;
  left: 0 !important;
  margin: 0 !important;
  border-radius: 0 !important; /* fullscreen modals typically have no radius */
}

/* Card: white background, with margins for visible blue gutter on all sides */
.ui.card {
  background-color: #ffffff !important;
  margin: 10px !important; /* top/right/bottom/left gutters */
  padding: 0 !important;
  box-sizing: border-box !important;
  border-radius: 8px !important;
  width: calc(100% - 20px) !important; /* full width minus left/right margins */
  max-width: none !important; /* override any max-width */
}

/* Generic Smart input styling */
.smart-input-field {
  background-color: #EFFBFF !important;
  border-color: #666666 !important;
  border-width: 1px !important;
  border-style: solid !important;
  color: #333333 !important;
  border-radius: 6px !important;
}
.smart-input-field.input-required-field {
  border-color: #666666 !important;
  border-width: 1px !important;
  border-style: solid !important;
  border-radius: 6px !important;
}

.ui.card.tab-narrow-card {
  width: 350px !important;
  margin-top: auto !important;
  margin-bottom: auto !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

.tab-center-column {
  width: 100% !important;
  min-height: calc(100% - 60px) !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  align-items: center !important;
  text-align: center !important;
}

.tab-system-layout {
  position: relative !important;
  width: 100% !important;
  min-height: 100% !important;
}

.tab-system-logo {
  text-align: center !important;
  padding-top: 20px !important;
  padding-bottom: 10px !important;
}

.tab-system-card-wrapper {
  position: fixed !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
  width: 100% !important;
  display: flex !important;
  justify-content: center !important;
  padding: 0 16px !important;
  box-sizing: border-box !important;
}

.tab-system-card-wrapper form {
  width: 100% !important;
  display: flex !important;
  justify-content: center !important;
}

.tab-system-card-wrapper .ui.card {
  text-align: center !important;
}

.tab-system-card-wrapper .ui.card .content {
  text-align: center !important;
}

.tab-system-card-wrapper--fluid {
  position: relative !important;
  top: auto !important;
  left: auto !important;
  transform: none !important;
  padding-top: 20px !important;
  padding-bottom: 40px !important;
}

.tab-system-card-wrapper--fluid form {
  width: 100% !important;
  /*display: block !important;*/
}

.tablet-font-size {
  font-size: 1.3em !important;
}

/* Specific override for q-primary-text on labels in card content fields */
.ui.card .content .field label.q-primary-text {
  color: #425b76 !important;
  font-weight: bold !important;
}

.ui.dimmer {
  line-height: 1.2 !important;
}

/* Make the modals dimmer truly full-screen and solid in WebView */
.ui.dimmer.modals {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100% !important;
  height: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  background-color: rgba(0, 0, 0, 0.8) !important; /* stronger dim so you don't "see" underlying modals */
  overflow-y: auto !important;
}

/* In a stacked modals dimmer, only show the top-most modal */
.ui.dimmer.modals > .ui.modal {
  display: none !important;
}

.ui.dimmer.modals > .ui.modal:last-child {
  display: block !important;
}

/* For standard modals, allow content-driven height while keeping full-width layout.
   Fullscreen modals (.fullscreen) continue to use the earlier 100% height rule above. */
.ui.modal:not(.fullscreen),
.ui.scrolling.modal:not(.fullscreen) {
  background: #EFFBFF !important;
  padding: 0 !important;
  width: 100% !important;
  /* Let content/JS sizing drive the height for non-fullscreen modals */
  height: auto !important;
  max-height: 100% !important;
  top: 0 !important;
  left: 0 !important;
  margin: 0 !important;
  border-radius: 0 !important;
}

.appValidationError {
  display: none;
  width: 100%;
  background-color: #ffe6e6;
  color: #d80000;
}