@import "tailwindcss" source("../..");

@theme {
  --color-primary-50: oklch(0.985 0.002 247.839);
  --color-primary-100: oklch(0.967 0.003 264.542);
  --color-primary-200: oklch(0.928 0.006 264.531);
  --color-primary-300: oklch(0.872 0.01 258.338);
  --color-primary-400: oklch(0.707 0.022 261.325);
  --color-primary-500: oklch(0.551 0.027 264.364);
  --color-primary-600: oklch(0.446 0.03 256.802);
  --color-primary-700: oklch(0.373 0.034 259.733);
  --color-primary-800: oklch(0.278 0.033 256.848);
  --color-primary-900: oklch(0.21 0.034 264.665);
  --color-primary-950: oklch(0.13 0.028 261.692);

}

@import "@fortawesome/fontawesome-free/css/fontawesome" source("../..");
@import "@fortawesome/fontawesome-free/css/regular" source("../..");
@import "@fortawesome/fontawesome-free/css/solid" source("../..");
@import "@fortawesome/fontawesome-free/css/brands" source("../..");

@import "slim-select/styles" source("../..");

/* fix firefox scrollbars */
* {
  scrollbar-width: auto;
  scrollbar-color: rgba(161, 161, 170, var(--tw-bg-opacity)) white;
}

.fa-fade {
  animation: pulse 1s ease-in-out 0s infinite alternate;
}

@keyframes pulse {
  0% { scale: 0.95; opacity: 0.5; }
  100% { scale: 1.0; opacity: 1; }
}

/* disconnect toast */
.phx-connected > #disconnect {
  opacity: 0 !important;
  pointer-events: none;
}

.phx-error > #disconnect {
  opacity: 0.95 !important;
}

/* Alerts and form errors used by phx.new */
.alert {
  padding: 15px;
  margin-bottom: 20px;
  border: 1px solid transparent;
  border-radius: 4px;
}
.alert-info {
  color: #31708f;
  background-color: #d9edf7;
  border-color: #bce8f1;
}
.alert-warning {
  color: #8a6d3b;
  background-color: #fcf8e3;
  border-color: #faebcc;
}
.alert-danger {
  color: #a94442;
  background-color: #f2dede;
  border-color: #ebccd1;
}
.alert p {
  margin-bottom: 0;
}
.alert:empty {
  display: none;
}
.invalid-feedback {
  color: #a94442;
  display: block;
  margin: -1rem 0 2rem;
}

/* LiveView specific classes for your customization */
.phx-no-feedback.invalid-feedback,
.phx-no-feedback .invalid-feedback {
  display: none;
}

.phx-click-loading {
  opacity: 0.5;
  transition: opacity 1s ease-out;
}

.phx-loading{
  cursor: wait;
}

.phx-modal {
  opacity: 1!important;
  position: fixed;
  z-index: 1;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0,0,0,0.4);
}

.phx-modal-content {
  background-color: #fefefe;
  margin: 15vh auto;
  padding: 20px;
  border: 1px solid #888;
  width: 80%;
}

.phx-modal-close {
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
}

.phx-modal-close:hover,
.phx-modal-close:focus {
  color: black;
  text-decoration: none;
  cursor: pointer;
}

.fade-in-scale {
  animation: 0.2s ease-in 0s normal forwards 1 fade-in-scale-keys;
}

.fade-out-scale {
  animation: 0.2s ease-out 0s normal forwards 1 fade-out-scale-keys;
}

.fade-in {
  animation: 0.2s ease-out 0s normal forwards 1 fade-in-keys;
}
.fade-out {
  animation: 0.2s ease-out 0s normal forwards 1 fade-out-keys;
}

@keyframes fade-in-scale-keys{
  0% { scale: 0.95; opacity: 0; }
  100% { scale: 1.0; opacity: 1; }
}

@keyframes fade-out-scale-keys{
  0% { scale: 1.0; opacity: 1; }
  100% { scale: 0.95; opacity: 0; }
}

@keyframes fade-in-keys{
  0% { opacity: 0; }
  100% { opacity: 1; }
}

@keyframes fade-out-keys{
  0% { opacity: 1; }
  100% { opacity: 0; }
}

/* components */
.input, .ss-main, .ss-content, .ss-search input[type="search"] {
  @apply px-4 py-2 rounded-lg border focus:outline-hidden;
  @apply shadow-sm focus:shadow-lg;
  @apply transition-all duration-300 ease-in-out;
}

.input-primary {
  @apply border-primary-500 hover:border-primary-600 active:border-primary-600;
  @apply text-black;
}

.checkbox {
  -ms-transform: scale(1.5);
  -moz-transform: scale(1.5);
  -webkit-transform: scale(1.5);
  -o-transform: scale(1.5);
  transform: scale(1.5);
  padding: 10px;
  margin: 1em auto;
}

.title {
  @apply tracking-wide leading-5;
}

.btn {
  @apply px-4 py-2 rounded-lg focus:outline-hidden;
  @apply shadow-sm focus:shadow-lg;
  @apply transition-all duration-300 ease-in-out;
}

.btn-primary {
  @apply bg-primary-500 focus:bg-primary-600 active:bg-primary-600;
  @apply border-primary-500 focus:border-primary-600 active:border-primary-600;
  @apply text-white;
}

.btn-alert {
  @apply bg-rose-600 focus:bg-rose-700 active:bg-rose-800;
  @apply border-rose-600 focus:border-rose-700 active:border-rose-800;
  @apply text-white;
}

.hr {
  @apply w-full max-w-2xl border border-primary-300;
}

.hr-light {
  @apply w-full max-w-2xl border border-white;
}

.link {
  @apply hover:underline;
  @apply transition-colors duration-500 ease-in-out;
}

/* slim select */
.ss-main.input-primary {
  @apply border-primary-500 hover:border-primary-600 active:border-primary-600;
}

.ss-content.input-primary {
  @apply border-primary-500 hover:border-primary-600 active:border-primary-600;
}

.ss-content.ss-open-above {
  border-bottom-left-radius: 0px;
  border-bottom-right-radius: 0px;
}

.ss-content.ss-open-below {
  border-top-left-radius: 0px;
  border-top-right-radius: 0px;
}

.ss-content.input-primary .ss-search input[type="search"] {
  @apply border-primary-500 hover:border-primary-600 active:border-primary-600;
}

.ss-content.ss-open-above .ss-search {
  padding: var(--ss-spacing-l) 0 0 0;
}

.ss-content.ss-open-below .ss-search {
  padding: 0 0 var(--ss-spacing-l) 0;
}

.ss-content.ss-open-above .ss-list > *:not(:first-child) {
  margin: var(--ss-spacing-l) 0 0 0;
}

.ss-content.ss-open-below .ss-list > *:not(:last-child) {
  margin: 0 0 var(--ss-spacing-l) 0;
}

.ss-content .ss-list .ss-option {
  border-radius: var(--ss-border-radius);
}
