.accordion-container: {
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    width: 100%;
  }

.accordion-item {
    border-bottom: 1px solid #e0e0e0;
  }

.accordion-button {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: #f9f9f9;
    border: none;
    color: var(--text-color-1);
    cursor: pointer;
    text-align: left;
    font-weight: var(--font-weight-medium);
    font-size: var(--font-size-1);;

    & .icon {
      transform: rotate(0deg);
      transition: transform 0.2s ease;

      &.open {
        transform: rotate(180deg);
      }
    }
    & .title {
      display: flex;
      gap: 12px;
      align-items: center;
    }
}

.accordion-text {
  max-height: 0px;
  overflow: hidden;
  transition: max-height 0.3s ease-in-out, padding 0.3s ease-in-out;
  padding: 0 16px;
  background-color: #fff;

  &.open {
    max-height: 500px;
    padding: 16px;
  }
}
.dropdown {
  position: relative;
  display: inline-block;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.dropdown-toggle {
  padding: 8px 16px;
  background: #007ac2;
  color: #fff !important;
  border: 1px solid #d1d5db;
  border-radius: 0px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  color: #1f2937;

  &:hover {
    background: #00619b;
  }
}

.arrow {
  margin-left: 12px;
  font-size: 10px;
  transition: transform 0.2s ease;
  color: #fff;

  &.open {
    transform: rotate(180deg);
  }
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  list-style: none;
  padding: 4px 0;
  margin: 6px 0 0 0;
  min-width: 200px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  z-index: 50;
}

.dropdown-menu.show {
  display: block;
}

.dropdown-item {
  padding: 8px 16px 8px 32px;
  cursor: pointer;
  font-size: 14px;
  color: #374151;
  /* Sync keyboard focus styles alongside standard cursor hovers */
  &:hover,
  &.focused {
    background: #f3f4f6;
    color: #111827;
    outline: none; /* Removes standard browser blue ring outline inside custom box UI */
  }

  &.selected {
    background: #007ac2;
    color: #fff;

    &:hover {
      background: #00619b;
    }
  }
}

.dropdown-header {
  padding: 8px 16px 4px 16px;
  font-size: 11px;
  font-weight: 700;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.dropdown-divider {
  height: 1px;
  background-color: #e5e7eb;
  margin: 6px 0;
}

/* Style the native backdrop overlay */
dialog::backdrop {
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(2px);
}

/* Base resets for the native dialog element */
dialog {
  border: none;
  background: transparent;
  padding: 0;
  margin: auto;
  width: 1024px;
}

/* Internal modal card container */
.dialog-modal-container {
  background: white;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  width: 95%;
  max-width: 1024px;
}

/* Header layout rules */
.dialog-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  border-start-start-radius: 0.25rem;
  border-start-end-radius: 0.25rem;
  border-width: 0px;
  border-block-end-width: 1px;
  border-style: solid;
  border-color: #dfdfdf;

  h4 {
    margin: 0;
  }
}

.dialog-modal-title {
  order: 1;
  display: flex;
  min-inline-size: 0px;
  align-items: center;
  flex: 1 1 auto;
  padding-block: 1rem;
  padding-inline: 1.25rem 1.25rem;
}

/* Close button formatting */
.dialog-close-btn {
  order: 2;
  margin: 0;
  cursor: pointer;
  appearance: none;
  border-style: none;
  background-color: transparent;
  color: var(--text-color-1);
  outline-color: transparent;
  border-start-end-radius: 0.5rem;
  padding-block: 1.45rem 1.45rem;
  padding-inline: 1.45rem 1.45rem;
  flex: 0 0 auto;
  border: none;

  &:hover {
    background-color: #f3f3f3;
    color: #151515;
  }
}

.dialog-cancel-btn {
  border: #007ac2 1px solid;
  background-color: #fff;
  color: #007ac2;
  line-height: 1rem;
  font-size: 0.875rem;
  padding: 8px 16px;
  box-shadow: transparent 0px 0px 0px 1px inset;
  margin: 1rem 1.5rem 1rem 1rem;
  position: relative;
  box-sizing: border-box;
  display: flex;
  cursor: pointer;
  user-select: none;
  appearance: none;
  align-items: center;
  text-align: center;
  font-family: inherit;
  font-weight: 400;
  text-decoration-line: none;

  &:hover {
    border-color: #00619b;
    color: #00619b;
    box-shadow: inset 0px 0px 0px 1px #00619b
  }
}

.dialog-modal-content {
  padding: 1rem;
  position: relative;
  box-sizing: border-box;
  color: var(--text-color-2);
  display: block;
  block-size: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  background-color: #ffffff;
  max-block-size: calc(-12rem + 100vh);
}

.dialog-modal-footer {
  z-index: 400;
  margin-block-start: auto;
  box-sizing: border-box;
  display: flex;
  inline-size: 100%;
  justify-content: flex-end;
  border-end-end-radius: 0.25rem;
  border-end-start-radius: 0.25rem;
  border-width: 0px;
  border-block-start-width: 1px;
  border-style: solid;
  border-color: var(--calcite-ui-border-3);
  background-color: var(--calcite-ui-foreground-1);
  flex: 0 0 auto;
  padding-block: var(--calcite-modal-padding, var(--calcite-modal-padding-internal));
  padding-inline: var(--calcite-modal-padding-large, var(--calcite-modal-padding-large-internal));
}
.search-box {
  display: flex;
  flex: 1 1 auto; /* Allows the entire search block to fill remaining space */
  align-items: stretch;
  position: relative;
}

.search-box-input {
  flex: 1 1 auto;
  min-width: 100px;
  padding: 8px;
  /* Optional: removes the right border radius to blend into the button */
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
  border-right: none;
  box-shadow: none !important;
  height: 100% !important;
  margin: 0px !important;
}

.search-box-button {
  color: var(--body-color);
  background-color: var(--bg-white);
  flex: 0 0 auto;
  padding: 0.375rem 0.75rem;
  white-space: nowrap;
  /* Optional: removes left border radius to flush with the input */
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}

.search-box-button:hover {
  background-color: #e2e2e2;
  color: #151515;
  cursor: pointer;
}

.search-box-clear {
  position: absolute;
  top: 5px;
  right: 52px; /* Anchors the button perfectly right before the search icon track */
  background: transparent;
  border: none;
  /*font-size: 20px;*/
  line-height: 1;
  color: #666;
  cursor: pointer;
  padding: 4px;
  user-select: none;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  transition: color 0.1s ease, background-color 0.1s ease;
}

.search-box-clear:hover {
  color: #151515;
  background-color: rgba(0, 0, 0, 0.05); /* Soft background hover circle indicator */
}

[type=search] {
  -webkit-appearance: textfield;
  outline-offset: -2px;
}

.spinner-container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 200px; /* Adjust height based on where it is placed */
  padding: 2rem;
}

@keyframes spinner {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

.loading-message {
  margin-top: 1rem;
  font-family: sans-serif;
  color: #555;
  font-size: 1rem;
}

.loading-spinner {
  width: 50px;
  height: 50px;
  border: 5px solid #f3f3f3; /* Light grey track */
  border-top: 5px solid #3498db; /* Blue spinning accent */
  border-radius: 50%;
  animation: spinner 1s linear infinite;
}

