.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.no-scrollbar::-webkit-scrollbar {
  display: none;
}


@media (min-width: 1024px) {
  .no-scrollbar-desktop {
    -ms-overflow-style: none;
    scrollbar-width: none;
  }

  .no-scrollbar-desktop::-webkit-scrollbar {
    display: none;
  }
}


input:not([type="checkbox"]):not([type="radio"]):focus,
textarea:focus,
select:focus {
  outline: 2px solid transparent;
  outline-offset: 2px;

  --tw-ring-inset: var(--tw-empty, );
  --tw-ring-offset-width: 0px;
  --tw-ring-offset-color: transparent;
  --tw-ring-color: #be7dd1;
  --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);
  --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);
  box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
  border-color: #be7dd1 !important;
}


input[type="checkbox"]:focus,
input[type="radio"]:focus {
  outline: 2px solid transparent;
  outline-offset: 2px;
  --tw-ring-inset: var(--tw-empty, );
  --tw-ring-offset-width: 2px;
  --tw-ring-offset-color: #fff;
  --tw-ring-color: #be7dd1;
  --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);
  --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);
  box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
}


input:not([type="checkbox"]):not([type="radio"]):focus,
select:focus,
textarea:focus {
  border-radius: 0.5rem;
}


.container-items {
  display: flex;
  flex-wrap: wrap;
  align-items: center;

  overflow: visible;
}

.item-color {
  position: relative;
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border: none;
  outline: none;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 200ms ease;

  transform-origin: center center;
}

.item-color::after {
  position: absolute;
  content: "";
  inset: 0;
  width: 100%;
  height: 100%;
  background-color: var(--color);
  border-radius: inherit;
  transform: scale(1);
  pointer-events: none;
  transition: transform 200ms ease;
  transform-origin: center center;
}


.item-color:hover {
  transform: scale(1.06);
}

.item-color:active::after {
  transform: scale(0.98);
}


.item-color[aria-pressed="true"] {
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.9);
}


.item-color:focus-visible {
  box-shadow: 0 0 0 2px #be7dd1;
}


.item-color::before {
  display: none;
}


.drag-scroll {
  cursor: grab;
}

.drag-scroll.dragging {
  cursor: grabbing;
  user-select: none;
}

/*=========================
  نمط كتلة الأكواد المشتركة
  يظهر في جميع أنحاء الموقع بما فيها نوافذ العرض/الوصف الكاملة
=========================*/
.hat-code-block {
  background: #111214;
  border: 1px solid #2d2d2d;
  border-radius: 16px;
  overflow: hidden;
  margin: 12px 0;
  box-shadow: 0 6px 24px rgba(0, 0, 0, .35);
}

.hat-code-title {
  padding: 12px 16px;
  color: #e5e7eb;
  font-weight: 700;
  border-bottom: 1px solid #2d2d2d;
  background: #141517;
  text-align: right;
}

.hat-code-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-direction: row-reverse;
  /* RTL: زر النسخ في اليمين والوسم في اليسار */
  padding: 10px 16px;
  background: #141517;
  border-bottom: 1px solid #2d2d2d;
  color: #e5e7eb;
}

.hat-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* افتراضيًا: إخفاء زر الإزالة خارج سياق المحرر */
.hat-delete-btn {
  display: none;
}

/* داخل المحرر فقط: إظهار زر الإزالة */
.hat-editor .hat-delete-btn {
  display: inline-flex;
}

.hat-copy-btn {
  font-size: 13px;
  border: 1px solid #2d2d2d;
  padding: 8px 12px;
  border-radius: 10px;
  cursor: pointer;
  background: transparent;
  /* ينسجم مع صفوف Tailwind المفروضة مثل bg-brand-primary */
  color: #fff;
  /* تأمين ظهور النص */
  text-decoration: none;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}


.hat-lang {
  font-size: 12px;
  color: #cbd5e1;
  background: #1b1c1f;
  border: 1px solid #2d2d2d;
  padding: 6px 10px;
  border-radius: 10px;
  /* شكل مستطيل بزوايا مستديرة مثل أزرار الموقع */
}

.hat-path {
  font-size: 12px;
  color: #9ca3af;
  padding: 10px 16px;
  border-bottom: 1px dashed #2d2d2d;
  background: #0f0f10;
  direction: ltr;
  text-align: left;
}

.hat-pre {
  margin: 0;
  padding: 16px;
  background: #0c0d0f;
  color: #e5e7eb;
  overflow-x: auto;
  direction: ltr;
  text-align: left;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 13px;
  line-height: 1.7;
}

.hat-code {
  white-space: pre;
}

/* =========================
   Animations & Hero Helpers
   ========================= */
.hat-hero-gradient {
  /* Subtle gradient for hero background */
  background:
    radial-gradient(60% 80% at 20% 20%, rgba(190, 125, 209, 0.12), rgba(190, 125, 209, 0) 70%),
    radial-gradient(60% 60% at 80% 30%, rgba(20, 133, 45, 0.10), rgba(20, 133, 45, 0) 70%);
}

@keyframes hat-fade-up {
  from {
    opacity: 0;
    transform: translateY(16px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hat-animate-fade-up {
  opacity: 0;
  animation: hat-fade-up 600ms ease-out forwards;
}

.hat-animate-delay-1 {
  animation-delay: 120ms;
}

.hat-animate-delay-2 {
  animation-delay: 240ms;
}

.hat-animate-delay-3 {
  animation-delay: 360ms;
}

.hat-animate-delay-4 {
  animation-delay: 480ms;
}

/* Unified exit animation for route/page transitions */
@keyframes hat-fade-out-down {
  from {
    opacity: 1;
    transform: translateY(0);
  }

  to {
    opacity: 0;
    transform: translateY(8px);
  }
}

.hat-animate-fade-out {
  animation: hat-fade-out-down 220ms ease-in forwards;
}

@keyframes hat-float {
  0% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-6px);
  }

  100% {
    transform: translateY(0);
  }
}

.hat-float {
  animation: hat-float 6s ease-in-out infinite;
}

/* Interactive cards: gentle lift, glow and border accent */
.hat-interactive {
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease, background-color 220ms ease, opacity 220ms ease;
  will-change: transform, box-shadow, border-color;
}

.hat-interactive:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
  border-color: #be7dd1;
  /* brand-primary */
}

.hat-interactive:active {
  transform: translateY(-2px);
}

/* Optional subtle icon pop inside interactive cards */
.hat-icon-pop {
  transition: transform 220ms ease, opacity 220ms ease;
}

.hat-interactive:hover .hat-icon-pop {
  transform: scale(1.08);
}

/* Tilt effect (fun, subtle) */
.hat-tilt {
  transform-style: preserve-3d;
  transition: transform 220ms ease;
}

.hat-tilt:hover {
  transform: translateY(-2px) rotateX(2deg) rotateY(-2deg);
}

/* Sheen effect: a light glint passing over the card on hover */
.hat-sheen {
  position: relative;
  overflow: hidden;
}

.hat-sheen::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(255, 255, 255, 0) 30%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0) 70%);
  transform: translateX(-120%);
}

@keyframes hat-sheen-move {
  0% {
    transform: translateX(-120%);
  }

  100% {
    transform: translateX(120%);
  }
}

.hat-sheen:hover::after {
  animation: hat-sheen-move 800ms ease;
}

/* Ripple click effect */
.hat-ripple {
  position: relative;
  overflow: hidden;
}

.hat-ripple-effect {
  position: absolute;
  border-radius: 9999px;
  transform: translate(-50%, -50%);
  pointer-events: none;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.35) 0%, rgba(255, 255, 255, 0.2) 40%, rgba(255, 255, 255, 0.05) 60%, rgba(255, 255, 255, 0) 70%);
  animation: hat-ripple-wave 600ms ease-out forwards;
}

@keyframes hat-ripple-wave {
  0% {
    width: 0;
    height: 0;
    opacity: 0.9;
  }

  60% {
    opacity: 0.35;
  }

  100% {
    width: 240px;
    height: 240px;
    opacity: 0;
  }
}

/* Mouse-based tilt (parallax) */
.hat-tilt-mouse {
  transform-style: preserve-3d;
  transition: transform 220ms ease;
  will-change: transform;
}

/* values set via JS: --rx and --ry (deg) */
.hat-tilt-mouse.is-tilting {
  transform: translateY(-2px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
}

/* Animated gradient border */
.hat-border-gradient {
  position: relative;
}

.hat-border-gradient::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  /* border thickness */
  background: conic-gradient(from 0deg, #be7dd1, #7dd1be, #be7dd1);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: hat-rotate 6s linear infinite;
}

@keyframes hat-rotate {
  to {
    transform: rotate(360deg);
  }
}

/* Gentle flash (soft glow pulse) */
.hat-flash-slow {
  animation: hat-soft-glow 7s ease-in-out infinite;
}

@keyframes hat-soft-glow {

  0%,
  92% {
    box-shadow: 0 0 0 rgba(190, 125, 209, 0);
  }

  96% {
    box-shadow: 0 0 0 rgba(190, 125, 209, 0.15);
  }

  100% {
    box-shadow: 0 0 0 rgba(190, 125, 209, 0);
  }
}

/* Mobile scroll hint */
.hat-scroll-hint {
  position: absolute;
  bottom: 8px;
  left: 12px;
  right: 12px;
  pointer-events: none;
}

.hat-scroll-hint-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.7);
  font-size: 12px;
  animation: hat-hint-nudge 1400ms ease-in-out infinite;
}

@keyframes hat-hint-nudge {

  0%,
  100% {
    transform: translateX(0);
    opacity: 0.6;
  }

  50% {
    transform: translateX(6px);
    opacity: 1;
  }
}