/* =============================================
   SERVIRIS - Landing Page Styles
   ============================================= */

/* Health ping animation - stops after 3 iterations */
.health-ping {
  animation: health-ping 1.5s cubic-bezier(0, 0, 0.2, 1) 3;
  will-change: transform, opacity;
}

@keyframes health-ping {
  0% {
    transform: scale(1);
    opacity: 0.75;
  }
  75%,
  100% {
    transform: scale(2);
    opacity: 0;
  }
}

/* Hero Pattern */
.hero-pattern {
  background-image: radial-gradient(#000000 0.5px, transparent 0.5px);
  background-size: 24px 24px;
}

/* Flag Slider - JavaScript controlled */
.flag-slider {
  will-change: transform;
}

/* =============================================
   Drag and Drop (Sortable.js)
   ============================================= */

.sortable-ghost {
  opacity: 0.4;
  background: #f3f4f6;
}

.sortable-drag {
  cursor: grabbing;
}

.cursor-grab {
  cursor: grab;
}

/* =============================================
   Icon Picker
   ============================================= */

.icon-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}

.icon-option {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  border: 2px solid transparent;
  background: #f9fafb;
  cursor: pointer;
  transition: all 0.2s ease;
}

.icon-option:hover {
  background: #f3f4f6;
  border-color: #e5e7eb;
}

.icon-option.selected {
  border-color: #000;
  background: #f3f4f6;
}

.icon-option i {
  font-size: 20px;
  color: #374151;
}

/* =============================================
   Coloris (Color Picker) Customization
   ============================================= */

.clr-field {
  display: inline;
}

.clr-field button {
  display: none;
}

.clr-picker {
  border-radius: 16px !important;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25) !important;
  border: 1px solid rgba(0, 0, 0, 0.1) !important;
  z-index: 9999 !important;
}

.clr-gradient {
  border-radius: 10px !important;
}

.clr-hue,
.clr-alpha {
  border-radius: 8px !important;
}

/* =============================================
   Apple-style Color Row
   ============================================= */

.color-row {
  display: flex;
  align-items: center;
  padding: 14px 16px;
  background: #f5f5f7;
  border-radius: 12px;
  transition: all 0.2s ease;
  cursor: pointer;
}

.color-row:hover {
  background: #ebebed;
}

.color-row-label {
  flex: 1;
  font-size: 14px;
  font-weight: 500;
  color: #1d1d1f;
  letter-spacing: -0.01em;
}

.color-row-swatch {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  border: 2px solid rgba(0, 0, 0, 0.08);
  position: relative;
  cursor: pointer;
  transition: all 0.2s ease;
  background-image: linear-gradient(45deg, #e5e7eb 25%, transparent 25%),
    linear-gradient(-45deg, #e5e7eb 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #e5e7eb 75%),
    linear-gradient(-45deg, transparent 75%, #e5e7eb 75%);
  background-size: 8px 8px;
  background-position: 0 0, 0 4px, 4px -4px, -4px 0px;
  overflow: hidden;
}

.color-row-swatch:hover {
  transform: scale(1.05);
  border-color: rgba(0, 0, 0, 0.15);
}

.color-row-swatch::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 8px;
  background-color: inherit;
}

.color-row-value {
  margin-left: 12px;
  margin-right: 14px;
  font-size: 12px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-weight: 500;
  color: #86868b;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  min-width: 80px;
  text-align: right;
}

/* Hidden color input */
.color-input-hidden {
  position: absolute;
  width: 0;
  height: 0;
  opacity: 0;
  pointer-events: none;
}

/* =============================================
   Tag Preview
   ============================================= */

.tag-preview {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.2s ease;
}

.tag-preview i {
  font-size: 14px;
}

/* =============================================
   Apple-style Allergen Checkbox
   ============================================= */

.allergen-checkbox {
  position: relative;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  border: 2px solid #d1d5db;
  background: white;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.allergen-checkbox .check-icon {
  opacity: 0;
  transform: scale(0.5);
  transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  color: white;
  font-size: 14px;
}

.allergen-item input:checked ~ .allergen-checkbox {
  background: #000;
  border-color: #000;
}

.allergen-item input:checked ~ .allergen-checkbox .check-icon {
  opacity: 1;
  transform: scale(1);
}

.allergen-item:hover .allergen-checkbox {
  border-color: #9ca3af;
}

.allergen-item input:checked ~ .allergen-checkbox:hover {
  background: #1f2937;
  border-color: #1f2937;
}

.allergen-item.selected {
  background: rgb(249 250 251);
  border-color: #e5e7eb;
}

/* =============================================
   Apple-style Tag Checkbox
   ============================================= */

.tag-checkbox {
  position: relative;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  border: 2px solid #d1d5db;
  background: white;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.tag-checkbox .check-icon {
  opacity: 0;
  transform: scale(0.5);
  transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  color: white;
  font-size: 14px;
}

.tag-item input:checked ~ .tag-checkbox {
  background: #000;
  border-color: #000;
}

.tag-item input:checked ~ .tag-checkbox .check-icon {
  opacity: 1;
  transform: scale(1);
}

.tag-item:hover .tag-checkbox {
  border-color: #9ca3af;
}

.tag-item input:checked ~ .tag-checkbox:hover {
  background: #1f2937;
  border-color: #1f2937;
}

.tag-item.selected {
  background: rgb(249 250 251);
  border-color: #e5e7eb;
}

/* =============================================
   Toastify Notifications
   ============================================= */

.toastify {
  z-index: 9999 !important;
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: space-between !important;
}

.toast-success {
  background: linear-gradient(135deg, #10b981, #059669) !important;
  border-radius: 12px !important;
  padding: 12px 16px !important;
  font-family: inherit !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  box-shadow: 0 10px 25px -5px rgba(16, 185, 129, 0.3),
    0 8px 10px -6px rgba(16, 185, 129, 0.2) !important;
}

.toast-error {
  background: linear-gradient(135deg, #ef4444, #dc2626) !important;
  border-radius: 12px !important;
  padding: 12px 16px !important;
  font-family: inherit !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  box-shadow: 0 10px 25px -5px rgba(239, 68, 68, 0.3),
    0 8px 10px -6px rgba(239, 68, 68, 0.2) !important;
}

.toast-info {
  background: linear-gradient(135deg, #3b82f6, #2563eb) !important;
  border-radius: 12px !important;
  padding: 12px 16px !important;
  font-family: inherit !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  box-shadow: 0 10px 25px -5px rgba(59, 130, 246, 0.3),
    0 8px 10px -6px rgba(59, 130, 246, 0.2) !important;
}

.toast-warning {
  background: linear-gradient(135deg, #f59e0b, #d97706) !important;
  border-radius: 12px !important;
  padding: 12px 16px !important;
  font-family: inherit !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  box-shadow: 0 10px 25px -5px rgba(245, 158, 11, 0.3),
    0 8px 10px -6px rgba(245, 158, 11, 0.2) !important;
}

.toastify .toast-close {
  color: white !important;
  opacity: 0.5;
  padding: 0 !important;
  margin-left: auto !important;
  padding-left: 10px !important;
  font-size: 10px !important;
  cursor: pointer;
  transition: opacity 0.2s ease;
  line-height: 1;
  font-weight: 300;
  flex-shrink: 0;
  order: 2 !important;
}

.toastify .toast-close:hover {
  opacity: 0.8;
}

/* =============================================
   Form Autofill Override
   ============================================= */

input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
  -webkit-box-shadow: 0 0 0 30px white inset !important;
}

input:-webkit-autofill {
  -webkit-text-fill-color: rgb(0, 0, 0) !important;
}

/* =============================================
   Glass Navigation
   ============================================= */

.glass-nav {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* =============================================
   Gradient Text
   ============================================= */

.gradient-text {
  background: linear-gradient(135deg, #000000 0%, #434343 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* =============================================
   Smooth Scrolling
   ============================================= */

html {
  scroll-behavior: smooth;
}

/* =============================================
   Scrollbar Hide
   ============================================= */

.scrollbar-hide::-webkit-scrollbar {
  display: none;
}

.scrollbar-hide {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* =============================================
   Language Modal
   ============================================= */

.lang-item .arrow-icon {
  display: block;
}

.lang-item .check-icon {
  display: none;
}

.lang-item.active .arrow-icon {
  display: none;
}

.lang-item.active .check-icon {
  display: block;
}

.lang-item.active {
  background-color: #f3f4f6;
}

/* =============================================
   Premium Shadow
   ============================================= */

.shadow-premium {
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* =============================================
   Dialog Backdrop
   ============================================= */

dialog::backdrop {
  background: transparent;
}

/* =============================================
   Button Cursor
   ============================================= */

button {
  cursor: pointer;
}

/* =============================================
   Dashboard Slider - Minimal Deluxe
   ============================================= */

.dashboard-slider {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
}

@media (min-width: 768px) {
  .dashboard-slider {
    aspect-ratio: 16 / 9;
  }
}

.dashboard-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 1s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dashboard-slide.active {
  position: absolute;
  opacity: 1;
  pointer-events: auto;
}

.dashboard-slide img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Navigation Arrows - Minimal & Compact */
.dashboard-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: white;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 1;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 10;
}

.dashboard-arrow i {
  font-size: 14px;
  color: #6b7280;
  transition: all 0.2s ease;
}

.dashboard-arrow-prev {
  left: 8px;
}

.dashboard-arrow-next {
  right: 8px;
}

.dashboard-arrow:hover {
  background: white;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.12);
  transform: translateY(-50%) scale(1.1);
}

.dashboard-arrow:hover i {
  color: #3b82f6;
}

.dashboard-arrow:active {
  transform: translateY(-50%) scale(0.95);
}

@media (min-width: 768px) {
  .dashboard-arrow {
    width: 32px;
    height: 32px;
  }

  .dashboard-arrow i {
    font-size: 16px;
  }

  .dashboard-arrow-prev {
    left: 12px;
  }

  .dashboard-arrow-next {
    right: 12px;
  }
}

/* Dots Navigation - Ultra Minimal Glassmorphism */
.dashboard-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border: 0.5px solid rgba(255, 255, 255, 0.3);
  padding: 0;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.dashboard-dot:hover {
  background: rgba(255, 255, 255, 0.4);
  border-color: rgba(255, 255, 255, 0.5);
  transform: scale(1.3);
}

.dashboard-dot.active {
  background: rgba(255, 255, 255, 0.85);
  border-color: rgba(255, 255, 255, 0.95);
  width: 5px;
  height: 5px;
  transform: scale(1.5);
}

@media (min-width: 768px) {
  .dashboard-dot {
    width: 6px;
    height: 6px;
  }

  .dashboard-dot.active {
    width: 6px;
    height: 6px;
    transform: scale(1.6);
  }
}
