/* Custom styling for tra NORD e SUD */

/* Smooth scroll behavior */
html {
  scroll-behavior: smooth;
}

/* Hide scrollbar for category tabs / horizontal carousels while keeping functionality */
.no-scrollbar::-webkit-scrollbar {
  display: none;
}
.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* Gallery Slider Drag & Smooth Scrolling */
#gallery-slider-container {
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
}
#gallery-slider-container.is-dragging {
  cursor: grabbing !important;
}
#gallery-slider-container img {
  pointer-events: none;
  -webkit-user-drag: none;
  user-select: none;
}

/* Custom subtle scrollbar for admin modal */
.custom-scrollbar::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
.custom-scrollbar::-webkit-scrollbar-track {
  background: #f6f3ec;
  border-radius: 4px;
}
.custom-scrollbar::-webkit-scrollbar-thumb {
  background: #c69238;
  border-radius: 4px;
}
.custom-scrollbar::-webkit-scrollbar-thumb:hover {
  background: #16305b;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in {
  animation: fadeIn 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Modal Overlay */
.modal-backdrop {
  background-color: rgba(14, 31, 61, 0.65);
  backdrop-filter: blur(6px);
}

/* Toggle Switch */
.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #c4c6d0;
  transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 24px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

input:checked + .slider {
  background-color: #3e5f43; /* Basil Accent */
}

input:checked + .slider:before {
  transform: translateX(20px);
}

/* Toast Notifications */
#toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  min-width: 280px;
  max-width: 420px;
  padding: 12px 18px;
  border-radius: 8px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 10px 25px -5px rgba(22, 48, 91, 0.25);
  display: flex;
  align-items: center;
  gap: 12px;
  animation: toastIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  transition: all 0.25s ease;
}

.toast.toast-success {
  background: #16305b;
  color: #ffffff;
  border-left: 4px solid #c69238;
}

.toast.toast-error {
  background: #ba1a1a;
  color: #ffffff;
  border-left: 4px solid #ffffff;
}

.toast.toast-info {
  background: #ffffff;
  color: #16305b;
  border: 1px solid rgba(22, 48, 91, 0.15);
  border-left: 4px solid #16305b;
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes toastOut {
  from {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  to {
    opacity: 0;
    transform: translateY(12px) scale(0.95);
  }
}
