/* Reporting an AI answer as wrong.
 *
 * Lives here, not in the Tailwind entry point, and is written out rather than
 * composed from utility classes. Both deliberately: a utility class this
 * markup introduces only exists once Tailwind rescans and rebuilds, and this
 * file is compiled by Sprockets through require_tree instead, so it ships
 * with the app whatever the Tailwind step does or does not produce.
 *
 * The control was invisible on staging twice before this moved here.
 */

.ai-message-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

/* The corner control for reporting an AI answer as wrong.
 *
 * Written out rather than composed from utility classes: a class this markup
 * introduces may not exist in a stylesheet built before it, and a half-styled
 * control looks broken rather than quiet. It sits on the timestamp row so it
 * can never overlap the last line of a long answer, and it is always present
 * -- a control revealed on hover cannot be found on a touch screen, and
 * nobody notices when it stops appearing. */
.ai-report-control {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  margin: -6px -4px -6px 0;
  border-radius: 999px;
  color: rgb(38 64 57 / 0.45);
  transition: color 150ms ease-in-out, background-color 150ms ease-in-out;
}

.ai-report-control:hover {
  color: #9b3412;
  background: rgb(38 64 57 / 0.06);
}

.ai-report-control:focus-visible {
  outline: 2px solid #365950;
  outline-offset: 2px;
  color: #9b3412;
}

/* A finger needs a bigger target than a pointer. */
@media (hover: none) {
  .ai-report-control {
    width: 44px;
    height: 44px;
    margin: -8px -8px -8px 0;
  }
}

/* Reporting an AI answer: the form, and the record left behind once sent.
 * Hand-written for the same reason as .ai-report-control above. */
.ai-report-panel {
  border-top: 1px solid rgb(38 64 57 / 0.12);
  margin-top: 2px;
  padding-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ai-report-panel > form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ai-report-panel__label {
  font-size: 12px;
  font-weight: 600;
  color: #264039;
}

.ai-report-panel__input {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  border: 1px solid rgb(38 64 57 / 0.22);
  border-radius: 10px;
  background: #ffffff;
  color: #264039;
  font: inherit;
  font-size: 14px;
  line-height: 1.5;
  resize: none;
}

.ai-report-panel__input:focus {
  outline: 2px solid #365950;
  outline-offset: 1px;
  border-color: transparent;
}

.ai-report-panel__actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.ai-report-panel__submit {
  height: 40px;
  padding: 0 18px;
  border: 0;
  border-radius: 10px;
  background: #365950;
  color: #f8f6f1;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.ai-report-panel__submit:hover {
  background: #264039;
}

.ai-report-panel__cancel {
  display: inline-flex;
  align-items: center;
  height: 40px;
  color: #4a5f58;
  font-size: 13px;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.ai-report-panel__note {
  margin: 0;
  font-size: 12px;
  line-height: 1.5;
  color: #4a5f58;
}

.ai-report-panel__error {
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  color: #9b3412;
}

.ai-report-record {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.ai-report-record__badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: #9b3412;
}

.ai-report-record__comment {
  margin: 4px 0 0;
  font-size: 13px;
  line-height: 1.5;
  color: #4a5f58;
  overflow-wrap: anywhere;
}

.ai-report-record__by {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: #4a5f58;
}

.ai-report-record__undo {
  flex-shrink: 0;
  color: #4a5f58;
  font-size: 13px;
  text-decoration: underline;
  text-underline-offset: 3px;
  background: none;
  border: 0;
  cursor: pointer;
}
.check-box-container {
  display: block;
  position: relative;
  cursor: pointer;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;

  /* Hide the browser's default checkbox */
  input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
  }

  /* Create a custom checkbox */
  .checkmark {
    position: absolute;
    top: 1px;
    left: 0;
    height: 16px;
    width: 16px;
    background-color: white;
    border: 1px solid #D9D9D9;
    border-radius: 4px;
  }

  /* Create the checkmark/indicator (hidden when not checked) */
  .checkmark:after {
    content: "";
    position: absolute;
    display: none;
  }

  /* Show the checkmark when checked */
  input:checked ~ .checkmark:after {
    display: block;
  }

  /* Style the checkmark/indicator */
  .checkmark:after {
    left: 5px;
    top: 1px;
    width: 5px;
    height: 10px;
    border: solid #24393E;
    border-width: 0 2px 2px 0;
    -webkit-transform: rotate(45deg);
    -ms-transform: rotate(45deg);
    transform: rotate(45deg);
  }
}
.modal-backdrop {
  position: fixed;
  background-color: #00000080;
  inset: 0;
  z-index: 70;
}

.modal-z-index {
  z-index: 80;
}
.row-bottom-border {
  position: relative;

  &::after {
    position: absolute;
    content: "";
    bottom: 0;
    left: 22px;
    right: 22px;
    height: 1px;
    background-color: #F3F4F6;
  }
}
:root {
  --side-bar-width: 256px;
}

.members-segmentation-tab {
  &.active {
    border-color: rgb(36 57 62);

    a {
      pointer-events: none;
      cursor: not-allowed;
    }
  }
  &:not(.active) {
    border-color: rgb(243 244 246);
  }
}

.members-action-bar-position {
  position: fixed;
  bottom: 40px;
  left: calc(((100vw - (var(--side-bar-width))) / 2) + 40px);

  @media (max-width: 768px) {
    left: calc((100vw / 2) - 215px);
  }
}

.action-bar-icon path {
  stroke: #24393E;
}

.action-bar-message-auto-hide {
  animation: hideAnimation 5s forwards;
}

@keyframes hideAnimation {
  0%   {
    opacity: 1;
  }
  90%  {
    opacity: 1;
  }
  100% {
    opacity: 0;
    visibility: hidden;
  }
}
.member-notes-container {
  max-height: 100px;
  overflow: hidden;
  transition: max-height 0.5s ease;

  &.expanded {
    max-height: none;
  }
}
.pagy {
  --B: 1;
  --H: 189;
  --S: 38;
  --L: 18;
  --A: 1;
  --spacing: 0.25rem;
  --padding: 0.75rem;
  --rounding: 1.125rem;
  --border-width: 0rem;
  --font-size: 0.875rem;
  --font-weight: 450;
  --line-height: 1.75;

  --text:               hsla(var(--H) var(--S) calc(var(--L) - (25 * var(--B))) / var(--A));
  --text-hover:         hsla(var(--H) var(--S) calc(var(--L) - (30 * var(--B))) / var(--A));
  --text-current:       hsla(var(--H) var(--S) calc(100 * (var(--B) + 1)) / var(--A));
  --background:         transparent;
  --background-hover:   hsla(var(--H) var(--S) calc(var(--L) + (60 * var(--B))) / var(--A));
  --background-current: hsla(var(--H) var(--S) var(--L) / var(--A));
  --background-input:   hsla(var(--H) var(--S) calc(var(--L) + (45 * var(--B))) / var(--A));

  color: var(--text);
  font-size: var(--font-size);
  line-height: var(--line-height);
  font-weight: var(--font-weight);
  display: flex;
}

.pagy > :not([hidden]) ~ :not([hidden]) {
  margin-left: calc(var(--spacing) * (1 - var(--space-reverse, 0)));
  margin-right: calc(var(--spacing) * var(--space-reverse, 0));
}

.rtl .pagy > :not([hidden]) ~ :not([hidden]) {
  --space-reverse: 1;
}

.pagy a:not([role="separator"]) { /* all but gaps */
  display: block;
  text-decoration: none;
  background-color: var(--background);
  padding: calc(var(--padding) / 3) var(--padding);
  border: var(--border-width) solid var(--background-current);
  border-radius: var(--rounding);
  color: inherit;
}

.pagy a[href]:hover { /* all links on hover */
  background-color: var(--background-hover);
  color: var(--text-hover)
}

.pagy a:not([href]) { /* all but links */
  cursor: default;
}

.pagy a[role="link"]:not([aria-current]) { /* disabled links */
  opacity: .6;
}

.pagy a[aria-current] {  /* current page */
  background-color: var(--background-current);
  color: var(--text-current);
  border-color: var(--text);
}

.pagy label {
  white-space: nowrap;
  display: inline-block;
  border: var(--border-width) solid var(--background-current);
  border-radius: var(--rounding);
  background-color: var(--background);
  padding: calc((var(--padding) / 3) - var(--border-width)) var(--padding);
}

.pagy label input {
  all: unset;
  border: var(--border-width) solid var(--background-current);
  border-radius: calc(var(--rounding) / 2) !important;
  background-color: var(--background-input);
}
/*
 * This is a manifest file that'll be compiled into application.css, which will include all the files
 * listed below.
 *
 * Any CSS (and SCSS, if configured) file within this directory, lib/assets/stylesheets, or any plugin's
 * vendor/assets/stylesheets directory can be referenced here using a relative path.
 *
 * You're free to add application-wide styles to this file and they'll appear at the bottom of the
 * compiled file so the styles you add here take precedence over styles defined in any other CSS
 * files in this directory. Styles in this file should be added after the last require_* statement.
 * It is generally better to create a new file per style scope.
 *


 */

.custom-blue:hover svg {
  fill: #eee7cd;
}

.webkit-fill-available {
  width: -webkit-fill-available;
}

.custom-height {
  height: calc(100vh - 80px);
}

.invisible-scrollbar::-webkit-scrollbar {
  display: none;
}

.invisible-scrollbar {
  -ms-overflow-style: none;  /* IE and Edge */
  scrollbar-width: none;  /* Firefox */
}
