/* Base Styles and Reset */
/* Modern CSS Reset */
*,
*::before,
*::after {
  box-sizing: border-box;
}

* {
  margin: 0;
  padding: 0;
  scrollbar-width: thin;
}

html {
  color-scheme: dark;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  font-family: var(--font-family-primary);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Custom body class for application pages */
.custom-body {
  background: var(--gradient-radial-blue);
  min-height: 100vh;
  height: 100%;
  width: 100%;
}

/* Focus styles for accessibility */
:focus {
  outline: 2px solid var(--surface-field-highlight);
  outline-offset: 2px;
}

:focus:not(:focus-visible) {
  outline: none;
}

/* Selection styles */
::selection {
  background: var(--surface-field-highlight);
  color: var(--text-on-light);
}

/* Link styles */
a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  text-decoration: none;
}

/* Button reset */
button {
  border: none;
  background: none;
  font: inherit;
  cursor: pointer;
}

input,
textarea,
select {
  font: inherit;
  color: inherit;
}

/* Remove default list styles */
ul,
ol {
  list-style: none;
}

/* Table reset */
table {
  border-collapse: collapse;
  border-spacing: 0;
}

/* Keyframe animations */
@keyframes fadeOut {
  from {
    opacity: 1;
    transform: scale(1);
  }
  to {
    opacity: 0;
    transform: scale(0.95);
    visibility: hidden;
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideIn {
  from {
    transform: translateX(-100%);
  }
  to {
    transform: translateX(0);
  }
}

/* Utility classes */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.text-center {
  text-align: center;
}
.center-text {
  text-align: center;
}
.text-left {
  text-align: left;
}
.text-right {
  text-align: right;
}

.flex {
  display: flex;
}
.flex-col {
  flex-direction: column;
}
.flex-row {
  flex-direction: row;
}
.items-center {
  align-items: center;
}
.items-start {
  align-items: flex-start;
}
.items-end {
  align-items: flex-end;
}
.justify-center {
  justify-content: center;
}
.justify-start {
  justify-content: flex-start;
}
.justify-end {
  justify-content: flex-end;
}
.justify-between {
  justify-content: space-between;
}

.w-full {
  width: 100%;
}
.h-full {
  height: 100%;
}
.min-h-screen {
  min-height: 100vh;
}

.gap-1 {
  gap: 0.25rem;
}
.gap-2 {
  gap: 0.5rem;
}
.gap-3 {
  gap: 0.75rem;
}
.gap-4 {
  gap: 1rem;
}
.gap-6 {
  gap: 1.5rem;
}
.gap-8 {
  gap: 2rem;
}

.p-4 {
  padding: 1rem;
}
.p-6 {
  padding: 1.5rem;
}
.p-8 {
  padding: 2rem;
}
.px-4 {
  padding-left: 1rem;
  padding-right: 1rem;
}
.py-4 {
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.m-4 {
  margin: 1rem;
}
.m-6 {
  margin: 1.5rem;
}
.m-8 {
  margin: 2rem;
}
.mx-auto {
  margin-left: auto;
  margin-right: auto;
}
.my-4 {
  margin-top: 1rem;
  margin-bottom: 1rem;
}

.relative {
  position: relative;
}
.absolute {
  position: absolute;
}
.fixed {
  position: fixed;
}

.z-10 {
  z-index: 10;
}
.z-20 {
  z-index: 20;
}
.z-30 {
  z-index: 30;
}

/* Responsive utilities */
.hidden {
  display: none;
}

.desktop-only {
  display: block !important;
}

.mobile-only {
  display: none !important;
}

@media (max-width: 1200px) {
  .desktop-only {
    display: none !important;
  }

  .mobile-only {
    display: block !important;
  }
}

@media (max-width: 767px) {
  .hidden-mobile {
    display: none;
  }
  .block-mobile {
    display: block;
  }
}

@media (min-width: 768px) {
  .hidden-desktop {
    display: none;
  }
  .block-desktop {
    display: block;
  }
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

@media (prefers-contrast: high) {
  :root {
    --surface-field-highlight: #ffffff;
    --text-primary: #ffffff;
  }
}

@media (prefers-reduced-motion: no-preference) {
  :root {
    scroll-behavior: smooth;
  }
}

/* Base badge class */
.badge {
  display: inline-block;
  padding: 0.35em 0.65em;
  font-size: 0.75em;
  font-weight: 700;
  line-height: 1;
  color: #fff;
  text-align: center;
  white-space: nowrap;
  vertical-align: baseline;
  border-radius: 0.25rem;
}

/* Rounded pill modifier */
.rounded-pill {
  border-radius: 50rem !important;
}

/* Background color classes */
.bg-primary {
  background-color: #0d6efd !important;
}

.bg-warning {
  background-color: #ffc107 !important;
  color: #000 !important; /* Warning typically uses dark text */
}

.bg-danger {
  background-color: #dc3545 !important;
}

/* Font weight bold */
.fw-bold {
  font-weight: 700 !important;
}

/* Additional badge responsive behavior */
.badge:empty {
  display: none;
}

/* Badge link styling (if used within links) */
a > .badge {
  position: relative;
  top: -1px;
}

/* Badge button styling (if used within buttons) */
.btn .badge {
  position: relative;
  top: -1px;
}

button:not(:disabled),
[type="button"]:not(:disabled),
[type="reset"]:not(:disabled),
[type="submit"]:not(:disabled) {
  cursor: pointer;
}

.polite_modal {
  position: relative;
}

.d-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.d-row-gap {
  display: flex;
  align-items: center;
  gap: 8px;
}
.d-column {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast-container {
  left: unset;
  z-index: 999999999999 !important;
  padding: 1rem;
  transform: translateX(-50%) !important;
  left: 50% !important;
  bottom: 0;
  position: fixed;
  right: 0;
  width: max-content;
  max-width: 100%;
  pointer-events: none;
}
#outer-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 99999999;
}
/* Toggle Switch */
.form-check.form-switch {
  vertical-align: middle;
  display: flex;
  align-items: center;
  gap: 8px;
}

.form-switch .form-check-switch {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  width: 32px;
  height: 16px;
  border-radius: 34px;
  border: 1px solid var(--Surfaces-Fields-Field-Stroke, #deecfa);
  background: var(--Surfaces-Fields-Field-Fill-Active, #fff);
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
}

.form-switch .form-check-switch:checked {
  background: var(--colour-brand-blue-600, #05386b);
}
.form-switch .form-check-switch:checked::before {
  background: var(--Base-Palette-Blue-Blue_950, #fcfeff);
}

.form-switch .form-check-switch::before {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 10px;
  height: 10px;
  background: var(--Text-Dark-Dark-High-Emphasis, rgba(5, 56, 107, 0.87));
  border-radius: 50%;
  transition: transform 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.form-switch .form-check-switch:checked::before {
  transform: translateX(15px);
}
.switch-label::after {
  content: "Inactief";
  color: var(--Text-Dark-High-emphasis, rgba(5, 56, 107, 0.87));
  font-size: 16px;
  font-style: normal;
  font-weight: 400;
  line-height: 24px;
  letter-spacing: 1px;
  transition: color 0.3s ease;
}

.form-check-switch:checked + .switch-label::after {
  content: "Actief";
}
/* Standalone Bootstrap-like List Styles */

/* Default list styling (same as Bootstrap) */
ul,
ol {
  margin-top: 0;
  margin-bottom: 1rem;
  padding-left: 2rem;
}

/* Ensure bullets are visible */
ul {
  list-style-type: disc;
  list-style-position: outside;
}

ol {
  list-style-type: decimal;
  list-style-position: outside;
}

/* Nested lists */
ul ul,
ol ol,
ul ol,
ol ul {
  margin-bottom: 0;
  margin-top: 0.25rem;
}

/* Bootstrap-like utility classes */

/* Remove list styling completely */
.list-unstyled {
  padding-left: 0;
  list-style: none;
  margin-bottom: 1rem;
}

.list-unstyled li {
  list-style: none;
}

/* Inline lists */
.list-inline {
  padding-left: 0;
  list-style: none;
  margin-bottom: 1rem;
}

.list-inline li,
.list-inline-item {
  display: inline-block;
  margin-right: 0.5rem;
}

.list-inline li:last-child,
.list-inline-item:last-child {
  margin-right: 0;
}

/* List group (Bootstrap component alternative) */
.list-group {
  display: flex;
  flex-direction: column;
  padding-left: 0;
  margin-bottom: 0;
  border-radius: 0.375rem;
}

.list-group-item {
  position: relative;
  display: block;
  padding: 0.75rem 1.25rem;
  background-color: #fff;
  border: 1px solid #dee2e6;
  list-style: none;
  text-decoration: none;
  color: #495057;
}

.list-group-item:first-child {
  border-top-left-radius: 0.375rem;
  border-top-right-radius: 0.375rem;
}

.list-group-item:last-child {
  border-bottom-left-radius: 0.375rem;
  border-bottom-right-radius: 0.375rem;
}

.list-group-item + .list-group-item {
  border-top-width: 0;
}

.list-group-item:hover {
  background-color: #f8f9fa;
}

/* Utility classes for different list styles */
.list-style-none {
  list-style-type: none !important;
}

.list-style-disc {
  list-style-type: disc !important;
}

.list-style-circle {
  list-style-type: circle !important;
}

.list-style-square {
  list-style-type: square !important;
}

.list-style-decimal {
  list-style-type: decimal !important;
}

.list-style-lower-alpha {
  list-style-type: lower-alpha !important;
}

.list-style-upper-alpha {
  list-style-type: upper-alpha !important;
}

.list-style-lower-roman {
  list-style-type: lower-roman !important;
}

.list-style-upper-roman {
  list-style-type: upper-roman !important;
}

/* Custom marker variations */
.list-custom-bullets {
  list-style-type: none;
  padding-left: 1.5rem;
}

.list-custom-bullets li::before {
  content: "•";
  color: #007bff;
  font-weight: bold;
  display: inline-block;
  width: 1rem;
  margin-left: -1rem;
}

.list-arrows {
  list-style-type: none;
  padding-left: 1.5rem;
}

.list-arrows li::before {
  content: "→";
  color: #6c757d;
  margin-right: 0.5rem;
  margin-left: -1.5rem;
  display: inline-block;
  width: 1rem;
}

.list-checks {
  list-style-type: none;
  padding-left: 1.5rem;
}

.list-checks li::before {
  content: "✓";
  color: #28a745;
  font-weight: bold;
  margin-right: 0.5rem;
  margin-left: -1.5rem;
  display: inline-block;
  width: 1rem;
}

/* Reset margins for nested unstyled lists */
.list-unstyled .list-unstyled {
  margin-left: 1.5rem;
}

.table > :not(caption) > * > * {
  padding: 4px 8px;
}
.repricer_home__body__table {
  /* Repricer Table Styling */
  .repricers-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 8px;
  }

  /* Table Header */
  .repricers-table thead {
  }

  .repricers-table thead th {
    text-align: left;
  }

  .repricers-table thead th.form-check {
    border-left: 1px solid transparent;
  }
  .repricers-table thead tr {
    text-align: left;
  }

  /* Table Body */
  .repricers-table tbody {
    vertical-align: inherit;
  }
  .repricers-table tbody tr {
    border-color: inherit;
    border-style: solid;
    border-width: 0;
    background: var(--Card-Card-Fill, #f7fbff);
  }
  .repricers-table tbody td:first-child {
    border-radius: 8px 0 0 8px;
    border-left: 1px solid var(--Card-Card-Stroke, #deecfa);
  }
  .repricers-table tbody td:last-child {
    border-radius: 0 8px 8px 0;
    border-right: 1px solid var(--Card-Card-Stroke, #deecfa);
  }

  .repricers-table tbody td {
    background: var(--Card-Card-Fill, #f7fbff);
    border-top: 1px solid var(--Card-Card-Stroke, #deecfa);
    border-bottom: 1px solid var(--Card-Card-Stroke, #deecfa);
  }

  .repricers-table tbody td.text-center {
    text-align: center;
  }

  /* Checkboxes */
  .form-check-input {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    margin-top: 7px;
    width: 16px;
    height: 16px;
    border-radius: 4px;
    border: 1px solid
      var(--Text-Dark-Dark-High-Emphasis, rgba(5, 56, 107, 0.87));
    cursor: pointer;
    transition: all 0.2s ease;
    background-color: transparent;
    position: relative;
  }

  .form-check-input:checked {
    background-color: rgba(5, 56, 107, 0.87) !important;
    border-color: rgba(5, 56, 107, 0.87) !important;
  }
  .form-check-input:checked::after {
    content: "✓";
    color: white;
    font-size: 12px;
    position: absolute;
    top: -2px;
    left: 2px;
    font-weight: bold;
  }

  .repricers-table img.flag {
    height: 20px;
    width: 20px;
    border-radius: 50%;
    margin: 0 4px;
    margin-top: auto !important;
    margin-bottom: auto !important;
    vertical-align: middle;
  }

  /* Status icons */
  .siu-icon {
    margin-right: 8px;
    vertical-align: middle;
  }

  /* Buybox status column */
  .repricers-table td:nth-child(5) {
    font-weight: 500;
  }

  /* Toggle Switch */
  .form-check.form-switch {
    vertical-align: middle;
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .form-switch .form-check-switch {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    width: 32px;
    height: 16px;
    border-radius: 34px;
    border: 1px solid var(--Surfaces-Fields-Field-Stroke, #deecfa);
    background: var(--Surfaces-Fields-Field-Fill-Active, #fff);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
  }

  .form-switch .form-check-switch:checked {
    background: var(--colour-brand-blue-600, #05386b);
  }
  .form-switch .form-check-switch:checked::before {
    background: var(--Base-Palette-Blue-Blue_950, #fcfeff);
  }

  .form-switch .form-check-switch::before {
    content: "";
    position: absolute;
    top: 2px;
    left: 2px;
    width: 10px;
    height: 10px;
    background: var(--Text-Dark-Dark-High-Emphasis, rgba(5, 56, 107, 0.87));
    border-radius: 50%;
    transition: transform 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  }

  .form-switch .form-check-switch:checked::before {
    transform: translateX(15px);
  }
  .switch-label::after {
    content: "Inactief";
    color: var(--Text-Dark-High-emphasis, rgba(5, 56, 107, 0.87));
    font-size: 16px;
    font-style: normal;
    font-weight: 400;
    line-height: 24px;
    letter-spacing: 1px;
    transition: color 0.3s ease;
  }

  .form-check-switch:checked + .switch-label::after {
    content: "Actief";
  }

  /* Empty state */
  .repricer-empty-state {
    padding: 40px 20px;
    color: #6c757d;
    font-style: italic;
    background-color: #f8f9fa;
  }

  /* Small muted text */
  .text-muted {
    color: #6c757d !important;
  }

  small.text-muted {
    font-size: 12px;
  }

  /* Responsive adjustments */
  @media (max-width: 768px) {
    .repricers-table {
      font-size: 12px;
    }

    .repricers-table thead th,
    .repricers-table tbody td {
      padding: 8px 12px;
    }

    .repricers-table h5 {
      font-size: 14px;
    }

    .repricers-table img.flag {
      width: 20px;
    }
  }
}
.repricer_name {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  max-width: 255px;
}
.repricer_country {
  margin: 0 4px;
}
.table td {
  vertical-align: middle;
}

.no_repricer {
  padding: 50px 0;
  text-align: center;
  color: var(--Text-Dark-Dark-Disabled, rgba(5, 56, 107, 0.38));
}
.no_bg {
  background: unset !important;
  background-color: unset !important;
  border: unset !important;
  border-radius: unset !important;
}
.repricer_actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  a {
    display: flex;
    align-items: center;
    justify-content: center;
  }
}

/* Enhanced mobile responsiveness */
@media (max-width: 768px) {
  .repricer_home__body__table {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .repricers-table {
    min-width: 600px; /* Prevent table from becoming too narrow */
    font-size: 14px;
  }

  /* Adjust name column to take more space */
  .repricer_name {
    max-width: 180px;
    font-size: 14px;
  }

  /* Make action buttons smaller */
  .repricer_actions a {
    padding: 4px 8px;
    font-size: 12px;
  }

  /* Adjust button sizes in header */
  .repricer_home__body__top .buttons {
    flex-direction: column;
    gap: 8px;
    align-items: stretch;
  }

  .repricer_group_add a,
  .repricer_group_remove button {
    padding: 6px 12px;
    font-size: 14px;
    text-align: center;
  }

  /* Stack header elements vertically */
  .repricer_home__body__top {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
  }

  /* Adjust flag images */
  .repricers-table img.flag {
    width: 16px;
    height: 16px;
  }

  /* Make toggle switches smaller */
  .form-switch .form-check-switch {
    width: 28px;
    height: 14px;
  }

  .form-switch .form-check-switch::before {
    width: 8px;
    height: 8px;
    top: 2px;
    left: 2px;
  }

  .form-switch .form-check-switch:checked::before {
    transform: translateX(13px);
  }
  .repricers-table tbody td {
    white-space: nowrap;
  }
}

/* For very small screens */
@media (max-width: 480px) {
  .repricer_home__top .container-fluid {
    gap: 16px;
  }

  .repricer_box__body {
    padding: 0 16px 24px 16px;
  }

  .repricers-table {
    min-width: 500px;
    font-size: 12px;
  }

  .repricer_name {
    max-width: 120px;
    font-size: 12px;
  }

  /* Further reduce padding */
  .repricers-table thead th,
  .repricers-table tbody td {
    padding: 6px 8px;
  }
}

.pagination_main {
  margin-top: auto !important;
  display: flex;
  justify-content: space-between;
  align-items: center;
  input::-webkit-outer-spin-button,
  input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
  }
  input[type="number"] {
    -moz-appearance: textfield;
  }
  input {
    text-align: center;
    width: 34px;
    height: 34px;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    border-radius: 8px;
    border: 1px solid var(--Field-Field-Stroke, #deecfa);
    background: var(--Base-Palette-Basics-Pure_White, #fff);
  }
  .ga_group {
    display: flex;
    align-items: center;
    gap: 8px;
  }
  .btn__ga {
    color: var(--Text-Light-High-emphasis, rgba(204, 229, 255, 0.87));

    height: 32px;
    min-height: 32px;
    max-height: 32px;
    padding: 8px 16px;
    border-radius: 8px;
    background: var(--Base-Palette-Blue-Blue_400, #05386b);
  }
  .pagination {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 0;
    padding: 0;

    li {
      list-style-type: none;
    }
  }
  .page-item {
    img {
      margin-top: 8px;
    }
  }
  .page-item.disabled {
    cursor: not-allowed;
  }
  .page-item {
    cursor: pointer;
    a {
      text-decoration: none !important;
    }
  }
  .page-item.active {
    a {
      display: flex;
      align-items: center;
      justify-content: center;
      width: 24px;
      height: 24px;
      background-color: var(--Text-Dark-High-emphasis, rgba(5, 56, 107, 0.87));
      border-radius: 50%;
      color: var(--Text-Light-High-emphasis, rgba(204, 229, 255, 0.87));
      font-size: 16px;
      font-style: normal;
      font-weight: 700;
      line-height: 24px;
      letter-spacing: 1px;
    }
  }
}

.header_card {
  border-radius: 8px;
  border: 1px solid var(--Card-Card-Stroke, #deecfa);
  background: var(--Card-Card-Fill, #f7fbff);
  display: flex;
  flex-direction: column;
  gap: 22px;
  height: 100%;

  .header_card__top {
    display: inline-flex;
    align-items: center;
    gap: 9px;

    h3 {
      @media (max-width: 1600px) {
        font-size: 22px;
      }
    }
  }

  .icon_wrapper {
    border-radius: 8px 0px;
    background: var(--Buttons-Primary-Button-Primary-Fill, #05386b);
    display: flex;
    width: 60px;
    height: 60px;
    justify-content: center;
    align-items: center;
  }

  .header_card__body {
    padding-bottom: 32px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 0 20px 32px 20px;
  }
}

.form-control {
  padding: 0 8px;
  height: 32px;
  border-radius: var(--Surfaces-Fields-Field-Radius, 4px);
  border: 1px solid var(--Surfaces-Fields-Field-Stroke-Passive, #deecfa);
  background: var(--Surfaces-Fields-Field-Fill-Passive, #fcfeff);
}
.form-control:focus {
  outline: 4px solid var(--Surfaces-Fields-Field-Stroke-Active, #8fb5db);
}

.pointer {
  cursor: pointer;
}