/*
 * 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.
 *


 */

[x-cloak] {
  display: none !important;
}

.ts-wrapper {
  @apply w-full !ml-0;
}

.ts-control {
  @apply shadow-sm rounded-lg border-gray-300 bg-white py-2 px-3 text-base;

  /* Add caret https://github.com/orchidjs/tom-select/discussions/384 */
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
  background-position: right 0.5rem center;
  background-repeat: no-repeat;
  background-size: 1.5em 1.5em;
}

.ts-dropdown {
  @apply rounded-md border border-solid border-t border-gray-300 text-base;
}

.ts-dropdown [data-selectable].option:first-child {
  @apply rounded-t-lg;
}

.ts-dropdown [data-selectable].option:last-child {
  @apply rounded-b-lg;
}

.ts-dropdown .create:hover,
.ts-dropdown .option:hover {
  @apply bg-sky-50 text-sky-900;
}

.ts-dropdown .active {
  @apply bg-gray-100 text-gray-900;
}


/* fade/hide turbo contents while loading */
turbo-frame[busy] {
  opacity: 20%;
  /* visibility: hidden; */
}

turbo-frame[busy]~.loading-ring {
  display: inline-block;
}

.fixed-center-block {
  margin-left: auto;
  margin-right: auto;
  margin-top: 3em;
  margin-bottom: auto;
  position: absolute;
  inset: 0px 0px 0px 0px;
}


.loading-ring {
  width: 80px;
  height: 80px;
}

.loading-ring div {
  box-sizing: border-box;
  display: block;
  position: absolute;
  width: 64px;
  height: 64px;
  margin: 8px;
  border: 8px solid #333;
  border-radius: 50%;
  animation: loading-ring 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
  border-color: #333 transparent transparent transparent;
}

.loading-ring div:nth-child(1) {
  animation-delay: -0.45s;
}

.loading-ring div:nth-child(2) {
  animation-delay: -0.3s;
}

.loading-ring div:nth-child(3) {
  animation-delay: -0.15s;
}

@keyframes loading-ring {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}
