@import 'variables';

@import 'bootstrap/scss/bootstrap';
@import 'bootstrap-icons/font/bootstrap-icons';

@import 'sweetalert2/src/sweetalert2.scss';

@import 'choices';

@import 'plyr';

@import 'components/custom_datatable';
@import 'components/flash_messages';
@import 'components/loading_indicator';
@import 'components/search_bar';
@import 'components/sidebar';

@import 'pages/bulk_respondent_upload';
@import 'pages/reel_creator';
@import 'pages/assistant';
@import 'pages/transcripts';
@import 'pages/reports';
@import 'pages/research_documents';

::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background-color: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb {
  background-color: rgba(22, 21, 21, 0.307);
  border-radius: 20px;
  border: 2px solid transparent;
  background-clip: content-box;
}

::-webkit-scrollbar-thumb:hover {
  background-color: #a8bbbf;
}

.turbo-progress-bar {
  background-color: $primary;
}

@media (max-width: 640px) {

  html,
  body {
    font-size: 14px;
  }
}

.fs-2 {
  font-size: 0.125rem;
}

.fs-4 {
  font-size: 0.25rem;
}

.fs-10 {
  font-size: 0.625rem;
}

.fs-12 {
  font-size: 0.75rem;
}

.fs-14 {
  font-size: 0.875rem;
}

.fs-16 {
  font-size: 1rem;
}

.fs-18 {
  font-size: 1.125rem;
}

.fs-20 {
  font-size: 1.25rem;
}

.fs-24 {
  font-size: 1.5rem;
}

.fs-30 {
  font-size: 1.875rem;
}

.fs-56 {
  font-size: 3.5rem;
}

.medium {
  font-weight: 500;
}

.semi-bold {
  font-weight: 600;
}

.bold {
  font-weight: bold;
}

.bold-icon {
  -webkit-text-stroke: 1px;
}

.index-input {
  border: 1px solid #DCE0E4;
  font-size: 0.625rem;
  box-sizing: border-box;
  /* Ensure padding doesn't affect size */
  padding: 10px;
}

.index-select {
  border: 1px solid #DCE0E4;
  font-size: 0.625rem;
  padding-top: 0.625rem;
  padding-bottom: 0.625rem;
  color: #BEBEBE;
}

.index-select-option {
  font-size: 0.625rem;
  color: black;
}

.index-input::placeholder {
  color: #BEBEBE;
  opacity: 1;
  /* Firefox */
}

/* For Mozilla Firefox */
.index-input:-moz-placeholder {
  color: #BEBEBE;
  opacity: 1;
}

/* For Internet Explorer 10-11 */
.index-input:-ms-input-placeholder {
  color: #BEBEBE;
}

/* For Microsoft Edge */
.index-input::-ms-input-placeholder {
  color: #BEBEBE;
}

hr {
  border-color: #DCE0E4;
}

.btn {
  font-weight: 500;
}

.btn-secondary {
  color: $primary;
}

body {
  font-family: "Montserrat";
}

.monospaced-table {
  font-variant-numeric: tabular-nums; // To enable equal width for numbers
  font-family: "Montserrat";
}

.community-btn {
  @extend .btn-primary;
  background-color: $orange;
  color: white;
}

[v-cloak] {
  display: none;
}

.user-toggler {
  background: #f9fafb;
}

.btn-primary {
  color: white;

  &:hover {
    color: white;
  }
}

td a {
  text-decoration: none;
}

dialog {
  width: 400px;
  padding: 20px;
  border: 1px solid #ccc;
  background-color: #fff;
}

@media screen and (max-width: 768px) {
  dialog {
    width: 90%;
    margin: 0 auto;
  }
}

.section-header {
  width: 100%;
  color: $primary;
  font-weight: 600;
  justify-content: space-between;
  align-items: center;
  font-size: 1.25rem;
}

.section-adder {

  .btn,
  .arrow-line-container {
    visibility: hidden;
  }

  min-height: 15px;

  &:hover {

    .btn,
    .arrow-line-container {
      visibility: visible;
    }
  }
}

.arrow-line-container {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.arrow {
  width: 10;
  height: 0;
  border-style: solid;
}

.arrow-left {
  border-width: 10px 15px 10px 0;
  border-color: transparent $primary transparent transparent;
  margin-left: -2px;
}

.arrow-right {
  border-width: 10px 0 10px 15px;
  border-color: transparent transparent transparent $primary;
  margin-right: -2px;
}

.line {
  flex-grow: 1;
  margin-top: 0.5px;
  height: 2px;
  background-color: $primary;
}

.section-end-container {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  position: relative;
  height: 40px;
  /* Adjust the height to fit the text */
}

.section-end-line {
  flex-grow: 1;
  height: 0.5px;
  background-color: #f880a2;
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  transform: translateY(-50%);
  z-index: 1;
}

.section-end-text {
  background-color: $light;
  /* Matches the background to hide the line behind the text */
  padding: 0 10px;
  z-index: 2;
  position: relative;
  color: #f880a2;
}

.fw-500 {
  font-weight: 500;
}

.project-thumbnail-details {
  color: #BEBEBE;
}

.table-striped {
  thead {

    tr,
    th {
      background: $light;
    }
  }
}

.project-img-list {
  object-fit: cover;
}

.subproject-table {
  td {
    padding: 5px;
  }
}

.table-borderless-head {
  tbody td {
    border: 1px solid #E5F0FB;
  }
}

.reports-view-btn {
  font-weight: 600;
  padding: 25px;
  padding-top: 1px;
  padding-bottom: 1px;
}

.reports-generate-btn {
  font-weight: 600;
  padding: 25px;
  padding-top: 1px;
  padding-bottom: 1px;
}

.recent-projects-bar {
  width: 10vw;
  height: 100vh;
  background-color: white;
}

.sub-project-form {
  abbr[title="required"] {
    display: none;
  }

  .btn {
    padding-left: 70px;
    padding-right: 70px;
  }
}

.icon {
  stroke: black;
}

.feather-10 {
  width: 10px;
  height: 10px;
}

.feather-12 {
  width: 12px;
  height: 12px;
}

.feather-14 {
  width: 14px;
  height: 14px;
}

.feather-16 {
  width: 16px;
  height: 16px;
}

.feather-18 {
  width: 18px;
  height: 18px;
}

.feather-20 {
  width: 20px;
  height: 20px;
}

.feather-24 {
  width: 24px;
  height: 24px;
}

.feather-32 {
  width: 32px;
  height: 32px;
}

.feather-48 {
  width: 48px;
  height: 48px;
}

.number-circle {
  font-size: 1rem;
  width: 1rem;
  height: 1rem;
  padding: 0.75rem;

  font-weight: 600;
  background-color: white;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  border-radius: 50%;
}

.sprint-btn {
  height: 40px;
}

.object-cover {
  object-fit: cover;
}

.full-width-container {
  padding-right: 0;
  padding-left: 0;
  margin-right: auto;
  margin-left: auto;
}

.login-form {
  width: 80%;
  height: 100vh;
  display: flex;
  justify-content: center;
  flex-direction: column;
}

.login-top {
  margin-bottom: 4rem;
}

.login-title {
  font-size: 1.8rem;
  font-weight: 600;
  margin-bottom: 5px;
}

.login-btn {
  border-radius: 0;
}

.login-logo {
  width: 40vw;
}

.login-images {
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;

  img {
    height: calc((100vh - 0.5rem) / 3);
    width: 400px;
  }
}

.project-img-input {
  display: none;
}

.file-input-label {
  label {
    border-radius: 5px;
    background: $secondary;
    width: 100px;
    color: $primary;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform .2s ease-out;
  }
}

.tag-popup-container {
  height: 70vh;
  overflow: scroll;
}

.tag-checkbox {
  .form-check-input {
    background-color: #E5F0FB;
  }

  .form-check-input:checked {
    background-color: #E5F0FB !important;
    --bs-form-check-bg-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23000000' stroke-linecap='round' stroke-linejoin='round' stroke-width='1' d='m6 10 3 3 6-6'/%3e%3c/svg%3e") !important;
    border: 0;
  }

  .form-check-input:focus,
  .label::after,
  label.form-check-label:focus,
  .form-check-input::after,
  .form-check-input:not(:disabled):not(.disabled):active:focus {
    color: #E5F0FB;
    outline: 0;
    border: 0;
    box-shadow: 0 0 0 0.1rem #E5F0FB !important;
  }
}

.custom-choices {
  .choices[data-type*="select-multiple"] select.choices__input {
    display: block !important;
    opacity: 0;
    pointer-events: none;
    position: absolute;
    left: 0;
    bottom: 0;
  }

  .choices__inner {
    font-size: 0.75rem;
    border-radius: 5px;
    border-style: none;
  }

  .choices__list--multiple .choices__item {
    font-size: 0.75rem;
  }
}

.progress-container {
  width: 100%;
  height: 10px;
  background-color: #E5F0FB;
  border-radius: 2px;
  overflow: hidden;
}

.progress-bar {
  position: relative;
  height: 100%;
  background-color: #D8E8F8;
}

// .progress {  
//   width: 30%; /* Adjust this to set progress percentage */
//   height: 100%;
//   background-color: #aecff7;
//   border-radius: 5px 0 0 5px;
// }

.stripes {
  position: absolute;
  top: 0;
  left: 0;
  // width: 0%; /* Adjust this to set progress percentage */
  height: 100%;
  background-image: linear-gradient(135deg, rgba(244, 65, 116, 0.7) 25%, transparent 25%, transparent 50%, rgba(244, 65, 116, 0.7) 50%, rgba(244, 65, 116, 0.7) 75%, transparent 75%, transparent);
  /* Increased opacity to 0.7 */
  background-size: 15px 15px;
  animation: move 1s linear infinite;
}

@keyframes move {
  from {
    background-position: 0 0;
  }

  to {
    background-position: 15px 0;
  }
}

.speaker-map-tbody {
  font-size: 0.75rem;

  input[type="text"] {
    font-size: 0.75rem;
  }
}

.speaker-map {
  height: 85vh;
  overflow: scroll;
}

.reports-container {
  height: 100vh;

  ::-webkit-scrollbar {
    width: 12px;
    /* Width of the scrollbar */
    height: 12px;
    /* Height of the scrollbar */
  }

  ::-webkit-scrollbar-track {
    background: #f1f1f1;
    /* Track background */
  }

  ::-webkit-scrollbar-thumb {
    background-color: #888;
    /* Thumb color */
    border-radius: 6px;
    /* Rounded corners */
    border: 2px solid #f1f1f1;
    /* Padding around thumb */
  }

  ::-webkit-scrollbar-thumb:hover {
    background-color: #555;
    /* Darker color on hover */
  }

  scrollbar-width: thin;
  /* Width of scrollbar */
  scrollbar-color: #888 #f1f1f1;
  /* Thumb color and track color */
}

.reports-table {
  height: 100%;
  overflow: auto;
  position: relative;
}

.reports-table table {
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
}

.reports-table th,
.reports-table td {
  border: 1px solid #dee2e6;
  padding: 12px;
  min-width: 200px;
}

/* Header cells */
.reports-table thead tr>th {
  position: sticky;
  z-index: 3;
  top: 0;
  background: white;
  height: 80px;
  /* header height */
  vertical-align: middle;
  white-space: nowrap;
}

/* First header cell (top-left corner) */
.reports-table thead tr> :first-child {
  position: sticky;
  z-index: 4;
  /* Ensure it's above other sticky cells */
  left: 0;
  top: 0;
  background: white;
  overflow: visible;
  white-space: nowrap;
}

/* First column cells in tbody */
.reports-table tbody tr> :first-child {
  position: sticky;
  z-index: 2;
  /* Below header but above other cells */
  top: 80px;
  left: 0;
  background: white;
  overflow: visible;
  white-space: wrap;
}

// /* Optional: Add box-shadow for better visual separation */
// .reports-table thead tr > th {
//   box-shadow: 0 2px 2px -1px rgba(0, 0, 0, 0.1);
// }

// .reports-table tbody tr > :first-child {
//   box-shadow: 2px 0 2px -1px rgba(0, 0, 0, 0.1);
// }

// /* Corner cell gets both shadows */
// .reports-table thead tr > :first-child {
//   box-shadow: 
//     2px 0 2px -1px rgba(0, 0, 0, 0.1),
//     0 2px 2px -1px rgba(0, 0, 0, 0.1);
// }

.text-toggle {
  color: blue;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  font-size: 0.9em;
}

.moving-row {
  transition: transform 0.3s ease;
}

.context-menu {
  position: absolute;
  z-index: 2000;
  background: white;
  border: 1px solid #ccc;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  display: none;
  padding: 10px;
}

.color-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.color-box {
  width: 30px;
  height: 30px;
  border-radius: 4px;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.color-box:hover {
  transform: scale(1.1);
  border: 2px solid #000;
}

.theme-section {
  min-width: 240px;
  padding: 0 5px;
  margin-top: 12px;
}

.theme-section .form-select {
  font-size: 0.875rem;
  border-color: #e5e5e5;
  transition: border-color 0.2s ease;
}

.theme-section .form-select:hover {
  border-color: #4a5568;
}

.theme-section hr {
  margin: 12px 0;
  border-color: #e5e5e5;
  opacity: 0.8;
}

.theme-section .input-group {
  border-radius: 4px;
  overflow: hidden;
}

.theme-section .input-group .form-control {
  font-size: 0.875rem;
  border-color: #e5e5e5;
  transition: border-color 0.2s ease;
}

.theme-section .input-group .form-control:focus {
  border-color: #4a5568;
  box-shadow: none;
}

.theme-section .input-group .btn {
  border-color: #e5e5e5;
  color: #4a5568;
  transition: all 0.2s ease;
}

.theme-section .input-group .btn:hover {
  background-color: #f8f9fa;
  border-color: #4a5568;
  color: #2d3748;
}

.reel-section {
  min-width: 240px;
  padding: 0 5px;
  text-align: center;

  hr {
    margin: 12px 0;
    border-color: #e5e5e5;
    opacity: 0.8;
  }

  .btn-create-reel {
    background: linear-gradient(45deg, #4776E6, #8E54E9);
    border: none;
    color: white;
    font-size: 0.85rem;
    font-weight: 500;
    padding: 0.5rem 1.25rem;
    transition: all 0.3s ease;

    i {
      font-size: 0.9rem;
      vertical-align: -2px;
    }

    &:hover {
      background: linear-gradient(45deg, #4776E6, #8E54E9);
      transform: translateY(-1px);
      box-shadow: 0 4px 12px rgba(71, 118, 230, 0.3);
    }

    &:active {
      transform: translateY(0);
      box-shadow: 0 2px 6px rgba(71, 118, 230, 0.2);
    }

    &:focus {
      box-shadow: 0 0 0 3px rgba(71, 118, 230, 0.25);
    }
  }
}

.delete-highlight {
  display: flex;
  justify-content: center;
  margin-top: 12px;
}

.delete-highlight button {
  display: flex;
  align-items: center;
  color: #dc3545;
  text-decoration: none;
}

.delete-highlight button:hover {
  color: #bb2d3b;
}

// .no-highlight is same as .highlight-text in case the hover needs to be different when its not highlighted
.no-highlight {
  position: relative;
  transition: all 0.2s ease-in-out;
  border-radius: 2px;
}

.no-highlight:hover {
  filter: brightness(0.95);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  border-radius: 2px;
}

.highlight-text {
  position: relative;
  transition: all 0.2s ease-in-out;
  border-radius: 2px;
}

.highlight-text:hover {
  filter: brightness(0.95);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  border-radius: 2px;
}

.highlight-info {
  position: absolute;
  background: white;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 0.9em;
  z-index: 1000;
  border: 1px solid #e5e5e5;
  pointer-events: none;
  transition: opacity 0.2s ease-in-out;
}

.highlighted-by {
  font-weight: 500;
  color: #4a5568;
}

.theme {
  color: #718096;
}

.custom-card {
  .card {
    transition: all 0.2s ease-in-out;

    &:hover {
      transform: translateY(-2px);
      box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12) !important;
    }

    .card-header {
      cursor: pointer;

      .toggle-icon {
        transition: transform 0.3s ease;
      }

      &[aria-expanded="false"] {
        .toggle-icon {
          transform: rotate(-90deg);
        }
      }
    }

    .card-body {
      padding: 1.5rem;
    }

    .list-group-item {
      position: relative;
      transition: background-color 0.2s ease;

      &:hover {
        background-color: rgba(0, 0, 0, 0.02);
      }

      &:not(:last-child) {
        border-bottom: 1px solid rgba(0, 0, 0, 0.1);
      }
    }

    .highlight-content {
      font-size: 0.95rem;
      line-height: 1.6;
      white-space: pre-line; // Preserves line breaks
      color: var(--bs-gray-700);
      background-color: var(--bs-gray-100);
      padding: 1rem;
      border-radius: 0.5rem;
    }

    .badge {
      font-weight: 500;
      padding: 0.5em 1em;
      font-size: 0.85rem;
    }

    .btn-primary {
      font-weight: 500;
      text-transform: uppercase;
      font-size: 0.8rem;
      letter-spacing: 0.5px;
      box-shadow: 0 2px 4px rgba(var(--bs-primary-rgb), 0.2);

      &:hover {
        transform: translateY(-1px);
        box-shadow: 0 4px 8px rgba(var(--bs-primary-rgb), 0.3);
      }

      &:active {
        transform: translateY(0);
        box-shadow: 0 1px 2px rgba(var(--bs-primary-rgb), 0.2);
      }
    }

    .btn-create-reel {
      background: linear-gradient(45deg, #4776E6, #8E54E9);
      border: none;
      color: white;
      font-size: 0.85rem;
      font-weight: 500;
      padding: 0.5rem 1.25rem;
      transition: all 0.3s ease;

      i {
        font-size: 0.9rem;
        vertical-align: -2px;
      }

      &:hover {
        background: linear-gradient(45deg, #4776E6, #8E54E9);
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(71, 118, 230, 0.3);
      }

      &:active {
        transform: translateY(0);
        box-shadow: 0 2px 6px rgba(71, 118, 230, 0.2);
      }

      &:focus {
        box-shadow: 0 0 0 3px rgba(71, 118, 230, 0.25);
      }
    }

    .reel-preview {
      background-color: var(--bs-gray-100);
      transition: all 0.2s ease;

      &:hover {
        background-color: var(--bs-gray-200);
        cursor: pointer;
      }

      .btn-outline-secondary {
        border-width: 1.5px;
        font-size: 0.85rem;
        padding: 0.3rem 1rem;

        &:hover {
          background-color: var(--bs-white);
        }
      }

      .reel-video-container {
        margin-top: 1rem;
        border-radius: 0.5rem;
        overflow: hidden;

        &:has(video) {
          background-color: var(--bs-dark);
        }

        video {
          max-height: 400px;
          object-fit: contain;
        }

        audio {
          max-height: 400px;
          object-fit: contain;
        }
      }

      &.expanded {
        background-color: var(--bs-gray-200);
      }
    }

    // Processing badge style
    .badge.bg-warning {
      font-size: 0.9rem;
      padding: 0.5rem 1rem;

      .spinner-border {
        width: 1rem;
        height: 1rem;
        border-width: 2px;
      }
    }
  }
}

.collapse {
  transition: all 0.3s ease-out;
}

/* Custom tooltip styling */
.custom-tooltip {
  position: relative;
  display: inline-block;

  .tooltip-icon {
    cursor: pointer;
    color: #6c757d;
  }

  .tooltip-text {
    visibility: hidden;
    width: 220px;
    background-color: #333;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 8px;
    position: absolute;
    z-index: 1000;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 0.875rem;

    &::after {
      content: "";
      position: absolute;
      top: 100%;
      left: 50%;
      margin-left: -5px;
      border-width: 5px;
      border-style: solid;
      border-color: #333 transparent transparent transparent;
    }
  }

  // Modifier for compact tooltip
  &.compact {
    .tooltip-text {
      width: auto;
      padding: 4px 6px;
      font-size: 0.7rem;
      max-width: 160px;
      white-space: nowrap;
    }

    .tooltip-text::after {
      border-width: 4px;
    }
  }

  // Modifier to show tooltip below instead of above
  &.bottom {
    .tooltip-text {
      top: 125%;
      bottom: auto;

      &::after {
        top: auto;
        bottom: 100%;
        border-color: transparent transparent #333 transparent;
      }
    }
  }

  &:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
  }
}


.state-pill {
  display: inline-block;
}

.state-pill-running,
.state-pill-stopped {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 500;
  max-height: 22px;
  width: auto;
}

.state-pill-running {
  background-color: #E5F0FB;
  color: #044284;
}

.state-pill-stopped {
  background-color: #E5E5E5;
  color: #666666;
}

.state-pill-running span,
.state-pill-stopped span {
  margin-right: 6px;
}

.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
  background-color: #999;
}

.pulse-dot {
  background-color: rgba(244, 65, 116, 0.8);
  animation: pulse-animation 1.5s infinite;
}

@keyframes pulse-animation {
  0% {
    box-shadow: 0 0 0 0 rgba(244, 65, 116, 0.4);
  }

  70% {
    box-shadow: 0 0 0 5px rgba(244, 65, 116, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(244, 65, 116, 0);
  }
}

/* Used for Vue Draggable */

.dragArea {
  min-height: 10px;
}

.drag-handle {
  cursor: move;
  cursor: -webkit-grabbing;
  color: #adb5bd;
  opacity: 0.5;
  transition: opacity 0.2s ease;
}

.list-row:hover .drag-handle {
  opacity: 1;
}

.cursor-move {
  cursor: move;
}

.shadow-bottom-only {
  box-shadow: 0 4px 6px -2px rgba(0, 0, 0, 0.1);
}

/* Plyr media player style changes */
.player {
  --plyr-color-main: #F44174;
  --plyr-audio-control-color: #F44174;

  /* Target the menu container inside the .player element */
  .plyr__menu__container {
    /* Override Plyr's default positioning to move it below the button */
    bottom: auto !important;

    /* Set the top position to be 8px below the control bar */
    top: calc(100% + 8px) !important;
  }
}

/* Custom styles for your video player */

.video-container {
  /* Set a maximum height for the video wrapper */
  max-height: 30vh;
  // overflow: hidden; /* Prevent content from leaking outside max-height */
}

.video-container .plyr-player {
  /* Ensure the video element takes up the full width of its container */
  width: 100%;

  /* Apply the same max-height to the video element */
  max-height: 30vh;

  /* This is crucial: it scales the video down to fit while maintaining aspect ratio */
  height: auto;

  /* Ensures the entire video is visible without stretching */
  object-fit: contain;
}

/* Plyr media player style changes */

/* This class is applied to the item being dragged */
.sortable-ghost {
  opacity: 0.6;
  background: #f8f9fa;
}

/* This adds a subtle highlight to the drop target */
.sortable-chosen {
  background-color: #f0f7ff;
  box-shadow: 0 0 5px rgba(0, 123, 255, 0.2);
}

/* Animation for transition */
.flip-list-move {
  transition: transform 0.3s;
}

/* Define a CSS class for transition when reordering */
.moving-row {
  transition: transform 0.3s ease-out;
}

/* Make the drag handle only visible on hover for cleaner UI */
.list-row .drag-handle {
  visibility: visible;
  opacity: 0.4;
}

.list-row:hover .drag-handle {
  visibility: visible;
  opacity: 1;
}

/* Structure and layout styles for the flexbox-based design */
.list-header {
  border: 1px solid #dee2e6;
  border-bottom: none;
  font-weight: 500;
}

/* Make list container scrollable for better drag and drop */
.list-container {
  max-height: 75vh;
  overflow: auto;
  padding: 0;
  margin: 0;
  position: relative;
  scroll-behavior: smooth;
}

/* Custom scrollbar styling */
.list-container::-webkit-scrollbar {
  width: 4px;
}

.list-container::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

.list-container::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 4px;
}

.list-container::-webkit-scrollbar-thumb:hover {
  background: #aaa;
}

.draggable-list {
  border: 1px solid #dee2e6;
}

.list-row {
  border-bottom: 1px solid #dee2e6;
  transition: background-color 0.2s ease;
}

.list-row:last-child {
  border-bottom: none;
}

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

/* Column widths - generic for reuse */
.col-primary {
  width: 60%;
}

.col-secondary {
  width: 15%;
}

.col-actions {
  width: 25%;
}

.col-actions .btn {
  min-width: 36px;
  height: 36px;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Fix for potential empty space when dragging */
.sortable-drag {
  background: #ffffff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.add-item-row {
  padding: 0.5rem 0;
}

.btn-clear {
  background: transparent;
  border: none;
  padding: 0.25rem;
  cursor: pointer;
}

.btn-clear:hover {
  background-color: rgba(0, 0, 0, 0.05);
  border-radius: 0.25rem;
}

/* Used for Vue Draggable */

/* New Assistant */

.app-container {
  display: flex;
  flex-grow: 1;
  height: calc(100dvh - 90px);
  overflow: hidden;
}

.main-panel {
  display: flex;
  flex-direction: column;
  padding-left: 1rem;
  flex-grow: 1;
  overflow: hidden;
}

.chat-window {
  flex-grow: 1;
  overflow-y: auto;
  padding: 1rem;
}

.form-check-input.cb-lg {
  width: 1.2rem;
  height: 1.2rem;
  margin-top: 0;
  /* Align vertically in the flex container */
  cursor: pointer;
  border: 2px solid #dee2e6;
  transition: all 0.2s ease-in-out;

  &:checked {
    background-color: var(--bs-primary);
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 0.25rem rgba(var(--bs-primary-rgb), 0.15);
  }

  &:focus {
    box-shadow: 0 0 0 0.25rem rgba(var(--bs-primary-rgb), 0.1);
    border-color: var(--bs-primary);
  }
}

/* Optional: Highlight the row when checked */
tr.selected-row {
  background-color: rgba(var(--bs-primary-rgb), 0.05) !important;
}