/* staticfilesglobal is pre-compiled
static is compiled*/

/* Bootstrap 5 nested dropdown positioning - auto-flip to prevent overflow */
.dropdown-menu .dropend .dropdown-menu {
  top: 0;
  left: 100%;
}

.dropdown-menu .dropstart .dropdown-menu {
  top: 0;
  right: 100%;
  left: auto;
}

@media (min-width: 768px) {
  .dropdown-menu .dropdown-menu {
    margin-left: .1rem;
    margin-right: .1rem;
  }
}

/* Pill container with outline border - used across multiple pages */
.pill {
  border: 2px solid #dee2e6;
  border-radius: 15px;
  padding: 20px;
  margin-bottom: 15px;
  background-color: #fff;
}

/* Dark mode support for pills */
[data-bs-theme="dark"] .pill {
  border-color: #495057;
  background-color: #212529;
  color: #f8f9fa;
}

.text-sz-10 {
  font-size: 10px;
}
.text-sz-8 {
  font-size: 8px;
}
.text-sz-12 {
  font-size: 12px;
}
.smaller-text {
  font-size: 10px;
}
@font-face {
  font-family: "Virgo";
  src: url("/static/fonts/virgo.ttf") format("truetype");
}
.logo-font {
  font-family: "Virgo";
}
.logo-font-40 {
  font-family: "Virgo";
  font-size: 40px;
}
.logo-text {
  font-family: "Virgo";
  font-size: 60px;
  font-weight: bold;
}
.red-a {
  color: red;
}
.blue-a {
  color: blue;
}

[data-bs-theme="dark"] .logo-text h1 {
  color: #f8f9fa !important;
}

[data-bs-theme="dark"] .blue-a {
  color: #6ea8fe;
}
.page-footer {
  /*position: absolute;*/
  /*bottom: 0;*/
  width: 100%;
  height: auto;
  min-height: 80px;
  background-color: #f5f5f5;
  position: fixed;
  bottom: 0;
}

/* Mobile footer - not sticky, minimal space */
@media (max-width: 767px) {
  .page-footer {
    position: relative;
    height: auto;
    min-height: auto;
  }
  body {
    padding-bottom: 0;
  }
}

/* Desktop/tablet footer - sticky as before */
@media (min-width: 768px) {
  .page-footer {
    position: fixed;
    bottom: 0;
    height: auto;
    min-height: 80px;
  }
  body {
    flex: 0 0 80px;
    padding-bottom: 80px;
  }
}

.row-header,
.col-header {
  margin-top: 10px;
}
footer {
  z-index: 1000;
}
.grey-text,
.gray-text {
  color: darkgray;
  opacity: 0.5;
}
.btn {
  white-space: normal !important;
}

@media print {
  .col-sm-1,
  .col-sm-2,
  .col-sm-3,
  .col-sm-4,
  .col-sm-5,
  .col-sm-6,
  .col-sm-7,
  .col-sm-8,
  .col-sm-9,
  .col-sm-10,
  .col-sm-11,
  .col-sm-12 {
    float: left;
  }
  .col-sm-12 {
    width: 100%;
  }
  .col-sm-11 {
    width: 91.66666667%;
  }
  .col-sm-10 {
    width: 83.33333333%;
  }
  .col-sm-9 {
    width: 75%;
  }
  .col-sm-8 {
    width: 66.66666667%;
  }
  .col-sm-7 {
    width: 58.33333333%;
  }
  .col-sm-6 {
    width: 50%;
  }
  .col-sm-5 {
    width: 41.66666667%;
  }
  .col-sm-4 {
    width: 33.33333333%;
  }
  .col-sm-3 {
    width: 25%;
  }
  .col-sm-2 {
    width: 16.66666667%;
  }
  .col-sm-1 {
    width: 8.33333333%;
  }
  .col-sm-pull-12 {
    right: 100%;
  }
  .col-sm-pull-11 {
    right: 91.66666667%;
  }
  .col-sm-pull-10 {
    right: 83.33333333%;
  }
  .col-sm-pull-9 {
    right: 75%;
  }
  .col-sm-pull-8 {
    right: 66.66666667%;
  }
  .col-sm-pull-7 {
    right: 58.33333333%;
  }
  .col-sm-pull-6 {
    right: 50%;
  }
  .col-sm-pull-5 {
    right: 41.66666667%;
  }
  .col-sm-pull-4 {
    right: 33.33333333%;
  }
  .col-sm-pull-3 {
    right: 25%;
  }
  .col-sm-pull-2 {
    right: 16.66666667%;
  }
  .col-sm-pull-1 {
    right: 8.33333333%;
  }
  .col-sm-pull-0 {
    right: auto;
  }
  .col-sm-push-12 {
    left: 100%;
  }
  .col-sm-push-11 {
    left: 91.66666667%;
  }
  .col-sm-push-10 {
    left: 83.33333333%;
  }
  .col-sm-push-9 {
    left: 75%;
  }
  .col-sm-push-8 {
    left: 66.66666667%;
  }
  .col-sm-push-7 {
    left: 58.33333333%;
  }
  .col-sm-push-6 {
    left: 50%;
  }
  .col-sm-push-5 {
    left: 41.66666667%;
  }
  .col-sm-push-4 {
    left: 33.33333333%;
  }
  .col-sm-push-3 {
    left: 25%;
  }
  .col-sm-push-2 {
    left: 16.66666667%;
  }
  .col-sm-push-1 {
    left: 8.33333333%;
  }
  .col-sm-push-0 {
    left: auto;
  }
  .col-sm-offset-12 {
    margin-left: 100%;
  }
  .col-sm-offset-11 {
    margin-left: 91.66666667%;
  }
  .col-sm-offset-10 {
    margin-left: 83.33333333%;
  }
  .col-sm-offset-9 {
    margin-left: 75%;
  }
  .col-sm-offset-8 {
    margin-left: 66.66666667%;
  }
  .col-sm-offset-7 {
    margin-left: 58.33333333%;
  }
  .col-sm-offset-6 {
    margin-left: 50%;
  }
  .col-sm-offset-5 {
    margin-left: 41.66666667%;
  }
  .col-sm-offset-4 {
    margin-left: 33.33333333%;
  }
  .col-sm-offset-3 {
    margin-left: 25%;
  }
  .col-sm-offset-2 {
    margin-left: 16.66666667%;
  }
  .col-sm-offset-1 {
    margin-left: 8.33333333%;
  }
  .col-sm-offset-0 {
    margin-left: 0%;
  }
  .visible-xs {
    display: none !important;
  }
  .hidden-xs {
    display: block !important;
  }
  table.hidden-xs {
    display: table;
  }
  tr.hidden-xs {
    display: table-row !important;
  }
  th.hidden-xs,
  td.hidden-xs {
    display: table-cell !important;
  }
  .hidden-xs.hidden-print {
    display: none !important;
  }
  .hidden-sm {
    display: none !important;
  }
  .visible-sm {
    display: block !important;
  }
  table.visible-sm {
    display: table;
  }
  tr.visible-sm {
    display: table-row !important;
  }
  th.visible-sm,
  td.visible-sm {
    display: table-cell !important;
  }
}

/* OEM Manufacturer Software Section */
.oem-section {
  background-color: #f8f9fa;
}

[data-bs-theme="dark"] .oem-section {
  background-color: #1a1d21;
}

.oem-card {
  padding: 20px 10px;
  border-radius: 12px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  background: #ffffff;
  border: 1px solid #e9ecef;
}

[data-bs-theme="dark"] .oem-card {
  background: #e9ecef;
  border-color: #adb5bd;
}

.oem-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

[data-bs-theme="dark"] .oem-card:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.oem-logo {
  width: 100%;
  height: 80px;
  object-fit: contain;
  margin-bottom: 10px;
}

.oem-label {
  font-size: 13px;
  font-weight: 600;
  color: #6c757d;
  margin-bottom: 0;
  text-transform: uppercase;
  letter-spacing: 1px;
}

[data-bs-theme="dark"] .oem-label {
  color: #495057;
}

/* Invert white-on-transparent logos in light mode so they're visible */
.logo-invert-light {
  filter: invert(1);
}

[data-bs-theme="dark"] .logo-invert-light {
  filter: none;
}

/* Invert dark logos in dark mode so they're visible */
[data-bs-theme="dark"] .logo-invert-dark {
  filter: invert(1) hue-rotate(180deg);
}

.integration-icon-wrap {
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
}

/* Tooling section - slightly different background to distinguish from software section */
.oem-tooling-section {
  background-color: #ffffff;
}

[data-bs-theme="dark"] .oem-tooling-section {
  background-color: #212529;
}

/* ── Homepage dark mode ── */

/* Navbar */
[data-bs-theme="dark"] .navbar.navbar-light {
  background-color: #1e2a38 !important;
}

[data-bs-theme="dark"] .navbar.navbar-light .nav-link,
[data-bs-theme="dark"] .navbar.navbar-light .btn-outline-secondary {
  color: rgba(255, 255, 255, 0.85) !important;
  border-color: rgba(255, 255, 255, 0.3) !important;
}

[data-bs-theme="dark"] .navbar.navbar-light .nav-link:hover,
[data-bs-theme="dark"] .navbar.navbar-light .btn-outline-secondary:hover {
  color: #fff !important;
  border-color: rgba(255, 255, 255, 0.6) !important;
}

[data-bs-theme="dark"] .navbar.navbar-light .navbar-toggler-icon {
  filter: invert(1);
}

[data-bs-theme="dark"] .navbar.navbar-light .dropdown-menu {
  background-color: #2c3e50;
  border-color: #495057;
}

[data-bs-theme="dark"] .navbar.navbar-light .dropdown-item {
  color: rgba(255, 255, 255, 0.85);
}

[data-bs-theme="dark"] .navbar.navbar-light .dropdown-item:hover {
  background-color: #34495e;
  color: #fff;
}

/* Section headings */
[data-bs-theme="dark"] .oem-section h2,
[data-bs-theme="dark"] .oem-tooling-section h2 {
  color: #f8f9fa;
}

[data-bs-theme="dark"] .oem-section .text-muted,
[data-bs-theme="dark"] .oem-tooling-section .text-muted {
  color: #adb5bd !important;
}

/* Payment icons — override hardcoded inline colors */
[data-bs-theme="dark"] .oem-card .integration-icon-wrap i,
[data-bs-theme="dark"] .oem-card .integration-icon-wrap .fa-stack i {
  color: #adb5bd !important;
}

/* Keep Square brand blue visible */
[data-bs-theme="dark"] .oem-card .integration-icon-wrap .fa-brands.fa-square {
  color: #4d9aff !important;
}

select[required]:has(option[value=""]:checked) {
  border: 2px solid red;
  font-weight: bold;
}

/* Job Status Radio Buttons - Colorful and evenly spaced */
#id_status {
  display: flex;
  justify-content: space-between;
  align-items: stretch;
  gap: 10px;
  margin: 10px 0;
}

#id_status > div {
  flex: 1;
  position: relative;
}

#id_status label {
  display: block;
  padding: 12px 15px;
  text-align: center;
  border: 2px solid #ddd;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 500;
  background-color: #f8f9fa;
  color: #333;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

#id_status input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

/* Completed - Blue */
#id_status > div:has(input[value="CMP-DON-STD"]) label {
  border-color: #007bff;
  background-color: #e7f1ff;
  color: #004085;
}

#id_status > div:has(input[value="CMP-DON-STD"]:checked) label {
  background-color: #007bff;
  border-color: #0056b3;
  color: white;
  border-width: 3px;
  box-shadow: 0 4px 8px rgba(0, 123, 255, 0.3);
}

/* Ready To be Invoiced - Green */
#id_status > div:has(input[value="INV-RDY-BIL"]) label {
  border-color: #28a745;
  background-color: #e7f5ea;
  color: #155724;
}

#id_status > div:has(input[value="INV-RDY-BIL"]:checked) label {
  background-color: #28a745;
  border-color: #1e7e34;
  color: white;
  border-width: 3px;
  box-shadow: 0 4px 8px rgba(40, 167, 69, 0.3);
}

/* Followup needed - Orange */
#id_status > div:has(input[value="WRK-FLW-NED"]) label {
  border-color: #fd7e14;
  background-color: #fff3e6;
  color: #833c00;
}

#id_status > div:has(input[value="WRK-FLW-NED"]:checked) label {
  background-color: #fd7e14;
  border-color: #dc6502;
  color: white;
  border-width: 3px;
  box-shadow: 0 4px 8px rgba(253, 126, 20, 0.3);
}

/* Refunded - Purple */
#id_status > div:has(input[value="INV-REF-UND"]) label {
  border-color: #6f42c1;
  background-color: #f3e5ff;
  color: #4a2885;
}

#id_status > div:has(input[value="INV-REF-UND"]:checked) label {
  background-color: #6f42c1;
  border-color: #5a32a3;
  color: white;
  border-width: 3px;
  box-shadow: 0 4px 8px rgba(111, 66, 193, 0.3);
}

/* Mobile responsiveness */
@media (max-width: 767px) {
  #id_status {
    flex-direction: column;
  }

  #id_status label {
    padding: 10px;
  }
}

/* Toast countdown bar */
.toast-countdown {
  height: 4px;
  width: 100%;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 0 0 var(--bs-toast-border-radius) var(--bs-toast-border-radius);
  overflow: hidden;
}

.toast-countdown-bar {
  height: 100%;
  width: 100%;
  background: rgba(255, 255, 255, 0.6);
}
