@use "primeicons/primeicons.css";
@plugin 'tailwindcss-primeui';
@variant dark (&:where(.dark, .dark *));

@layer tailwind, primeng;

@layer tailwind {
  @import "tailwindcss";
}

* {
  scrollbar-width: thin;
  scroll-behavior: smooth;
  overscroll-behavior: none;

  ::-webkit-scrollbar {
    width: 4px;
    height: 4px;
  }

  ::-webkit-scrollbar-thumb {
    background: #999;
    border-radius: 20px;
  }

  ::-webkit-scrollbar-track {
    background: #fff;
    border-radius: 20px;
  }
}

html {
  font-size: 15px;
  font-family:
    "Inter",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    Helvetica,
    Arial,
    sans-serif,
    "Apple Color Emoji",
    "Segoe UI Emoji",
    "Segoe UI Symbol";
  line-height: normal;
}

.class-tooltip {
  border-radius: 8px;
  text-align: center;
  padding: 12px;
  box-shadow:
    0 1px 3px 0 rgba(0, 0, 0, 0.1),
    0 1px 2px 0 rgba(0, 0, 0, 0.06);
  width: 200px;
  white-space: pre-wrap;
  @apply bg-white dark:bg-surface-900 dark:text-gray-300;
}

.custom-cluster {
  background-color: #4f46e5;
  color: white;
  border-radius: 9999px;
  padding: 0.5rem;
  font-weight: 600;
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 3px solid white;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  transition: transform 0.2s ease;
}

.leaflet-contextmenu {
  display: none;
  box-shadow: 0 10px 20px rgba(#404040, 0.15);
  -webkit-border-radius: 4px;
  border-radius: 8px;
  padding: 8px;
  background-color: #fff;
  cursor: default;
  -webkit-user-select: none;
  -moz-user-select: none;
  user-select: none;
  font-family: "Inter", sans-serif;
  font-size: 15px;
}

.leaflet-contextmenu a.leaflet-contextmenu-item {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #222;
  font-size: 12px;
  line-height: 20px;
  text-decoration: none;
  border-radius: 8px;
  padding: 8px 36px 8px 8px;

  border-top: 1px solid transparent;
  border-bottom: 1px solid transparent;
  cursor: pointer;
  outline: none;
}

.leaflet-contextmenu a.leaflet-contextmenu-item.over {
  background-color: #f1f3f7;
  border-top: 1px solid #f0f0f0;
  border-bottom: 1px solid #f0f0f0;
}

.leaflet-contextmenu-icon {
  display: flex;
  align-items: center;
  width: 24px;
}

.listHover {
  .custom-cluster {
    background-color: red;
  }
  .marker-anchor {
    border: 3px dashed red !important;
  }
}

.table-colored-resizer .p-datatable-column-resizer {
  width: 2px;
  background-color: #999;
}
@media print {
  .table-colored-resizer .p-datatable-column-resizer {
    background-color: transparent;
  }
}

@keyframes slideYcenteredX {
  0% {
    opacity: 0;
    transform: translateX(-50%) translateY(100px);
  }
  100% {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

@keyframes slide-x {
  0% {
    opacity: 0;
    transform: translateX(-20px);
  }
}

.slide-x {
  animation: slide-x 0.3s both;
}

.custom-button {
  appearance: button;
  text-decoration: none;
  background-color: #3851e1;
  border-radius: 6px;
  border-width: 0;
  box-shadow:
    rgba(50, 50, 93, 0.1) 0 0 0 1px inset,
    rgba(50, 50, 93, 0.1) 0 2px 5px 0,
    rgba(0, 0, 0, 0.07) 0 1px 1px 0;
  box-sizing: border-box;
  color: #fff;
  cursor: pointer;
  font-size: 100%;
  height: 44px;
  line-height: 1.15;
  outline: none;
  overflow: hidden;
  padding: 0 25px;
  position: relative;
  text-align: center;
  text-transform: none;
  transform: translateZ(0);
  transition:
    all 0.2s,
    box-shadow 0.08s ease-in;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
  width: 100%;
  max-width: fit-content;

  &.orange {
    background-color: #f57340;
  }

  &:disabled {
    cursor: default;
    background-color: #a6a6a6;
  }

  &:focus {
    box-shadow:
      rgba(50, 50, 93, 0.1) 0 0 0 1px inset,
      rgba(50, 50, 93, 0.2) 0 6px 15px 0,
      rgba(0, 0, 0, 0.1) 0 2px 2px 0,
      rgba(50, 151, 211, 0.3) 0 0 0 4px;
  }
}

.place-box-dialog {
  animation: slideYcenteredX 0.3s both;
  z-index: 999;
  min-height: 100px;
  max-height: 800px;
  width: 95%;
  max-width: 1200px;
  position: fixed;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  transition: none;
  box-shadow: 0px 10px 20px rgba(0, 0, 0, 0.1);
  border-radius: 12px;
  display: flex;
  align-items: flex-end;

  &-content {
    position: relative;
    padding: 2rem;
    border-radius: 8px 8px 0 0;
    width: 100%;
  }
}
