:root {
  --page-zoom: 0.8;
}

@font-face {
  font-family: "GRIFTER";
  src: url("../assets/fonts/grifter/GRIFTER\ Bold\ 700.otf") format("opentype");
  font-weight: bold;
  font-style: normal;
}

@font-face {
  font-family: "Gilroy-Medium";
  src: url("../assets/fonts/gilroy/gilroy-medium.ttf") format("opentype");
  font-weight: bold;
  font-style: normal;
}

input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
  -webkit-background-clip: text;
  -webkit-text-fill-color: #ffffff;
  transition: background-color 5000s ease-in-out 0s;
  box-shadow: inset 0 0 0px 0px black;
}

html {
  scrollbar-gutter: stable;
  zoom: var(--page-zoom);
}

body {
  background-color: var(--color-black);
  font-family: var(--font-inter);
  color: var(--color-white);
}

#mobile__drawer {
  width: calc(100vw / var(--page-zoom));
  height: calc(100vh / var(--page-zoom));
  overflow-y: auto;
}

@theme {
  /* Font Family */
  --font-inter-tight: "Inter Tight";
  --font-urbanist: Urbanist;
  --font-grifter: GRIFTER;
  --font-gilroy-medium: Gilroy-Medium;
  --font-inter: Inter;
  --font-nunito-sans: "Nunito Sans";
  --font-lineawesome: LineAwesome;

  /* Breakpoints */
  --breakpoint-mq1250: screen and (max-width: 1250px);
  --breakpoint-mq1050: screen and (max-width: 1050px);
  --breakpoint-mq767: screen and (max-width: 767px);
  --breakpoint-mq750: screen and (max-width: 750px);
  --breakpoint-mq675: screen and (max-width: 675px);
  --breakpoint-mq450: screen and (max-width: 450px);
}

:root {
  --swiper-pagination-color: #f7a741;
  --swiper-pagination-bullet-border-radius: 999px;
  --swiper-pagination-bullet-inactive-color: white;
  --swiper-pagination-bullet-inactive-opacity: 0.15;
  --swiper-pagination-bullet-size: 8px;
}

.animate-fade-slide {
  opacity: 0%;
  animation: fadeSlideIn 0.6s ease-out forwards;
}

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

.animate-fade-in {
  animation: fadeIn 0.4s ease-out forwards;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

/* Spinner animation for loaders */
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.animate-spin {
  animation: spin 1s linear infinite;
}

.cta-banner {
  position: relative;
  z-index: 0;
  overflow: hidden;
}

.cta-banner::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: -100px;
  width: calc(100% + 100px);
  background-repeat: repeat-x;
  animation: bgPan 24s infinite ease-in-out;
  z-index: -1;
}

.cta-banner::before {
  background-image: url("../assets/other/desert-wallpaper-horizontal.webp");
  background-size: cover;
}

.convert-banner {
  position: relative;
  z-index: 0;
  overflow: hidden;
}

.convert-banner::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: -100px;
  width: calc(100% + 100px);
  background-repeat: repeat-x;
  animation: bgPan 24s infinite ease-in-out;
  z-index: -1;
}

.convert-banner::before {
  background-image: url("../assets/other/convertbg.webp");
  background-size: cover;
}

/* Animated profile banner background inside SVG foreignObject */
.profile-banner-image {
  width: 100%;
  height: 100%;
  background-image: url("../assets/other/desert-wallpaper-profile.webp");
  background-size: 120% auto;
  /* overscan to avoid edges during pan */
  background-repeat: no-repeat;
  background-position: 0% 50%;
  will-change: background-position;
  animation: bgPanProfile 60s infinite ease-in-out;
}

@keyframes bgPanProfile {
  0% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 60% 50%;
  }

  100% {
    background-position: 0% 50%;
  }
}

.leading-normal {
  --tw-leading: 1.1;
  line-height: 1.1;
}

.font-semibold {
  --tw-font-weight: var(--font-weight-semibold);
  font-weight: var(--font-weight-semibold);
}

@keyframes bgPan {
  0% {
    background-position: 0 50%;
  }

  50% {
    background-position: -100px 50%;
  }

  100% {
    background-position: 0 50%;
  }
}

.btn-ripple {
  position: relative;
  z-index: 0;
  overflow: hidden;
  transition: filter 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}

.btn-ripple:hover {
  /* Subtle darken to indicate hover on any background */
  filter: brightness(0.89);
}

.btn-ripple:active {
  transform: translateY(1px);
  filter: brightness(0.88);
}

/* CSS-only press-and-hold ripple (centered) */
.btn-ripple::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(circle at center, rgba(255, 255, 255, 0.3) 0%, rgba(255, 255, 255, 0.25) 35%, rgba(255, 255, 255, 0.15) 55%, transparent 70%);
  transform: scale(0);
  opacity: 0;
}

.btn-ripple:active::after {
  opacity: 1;
  animation: ripple-hold 800ms ease-out infinite;
}

/* Dropdown buttons: simple darken on interaction without layout changes */
.btn-dropdown {
  transition: filter 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.btn-dropdown:hover {
  filter: brightness(0.7);
}

.btn-dropdown:active {
  filter: brightness(0.85);
}

@keyframes ripple-hold {
  0% {
    transform: scale(0);
    opacity: 0.35;
  }

  60% {
    transform: scale(1.75);
    opacity: 0.15;
  }

  100% {
    transform: scale(2.2);
    opacity: 0;
  }
}

.ripple {
  position: absolute;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.3);
  transform: scale(0);
  animation: ripple-animation 600ms linear;
  pointer-events: none;
}

@keyframes ripple-animation {
  to {
    transform: scale(2.5);
    opacity: 0;
  }
}

.container {
  margin-inline: auto;
  padding-inline: calc(var(--spacing) * 4);
  @apply mx-auto px-4;
}

/* swiper */
.review .swiper-slide .testimonial-card {
  transform: scale(0.81);
  transition: transform 0.3s ease, opacity 0.3s ease;
  filter: blur(3px);
}

.review .swiper-slide-active .testimonial-card {
  transform: scale(1);
  z-index: 10;
  filter: none;
}

/* Make all dots smaller */
.review .swiper-pagination {
  position: relative !important;
}

.review .swiper-pagination-bullet {
  transition: 0.3s !important;
}

.swiper-pagination-bullet-active {
  width: 60px !important;
}

.dropdown-panel {
  -webkit-backdrop-filter: blur(50px);
  backdrop-filter: blur(50px);
}

/* Collapse implementation */
.collapse-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.collapse-arrow {
  transition: transform 0.3s ease;
}

.w-screen {
  width: calc(100vw / var(--page-zoom));
}

.min-w-screen {
  min-width: calc(100vw / var(--page-zoom));
}

.max-w-screen {
  max-width: calc(100vw / var(--page-zoom));
}

.h-screen {
  height: calc(100vh / var(--page-zoom));
}

.min-h-screen {
  min-height: calc(100vh / var(--page-zoom));
}

.max-h-screen {
  max-height: calc(100vh / var(--page-zoom));
}

/* Ensure SweetAlert2 toasts are above site overlays */
.swal2-container {
  z-index: 100000 !important;
}

/* Generic button loading spinner */
.btn-loading {
  pointer-events: none;
  opacity: 0.9;
}

.btn-spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  margin-right: 8px;
  border-radius: 9999px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  animation: btn-spin 0.6s linear infinite;
}

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

/* Chat list custom scrollbar */
#chat-messages {
  scrollbar-width: thin;
  scrollbar-color: rgba(247, 167, 65, 0.6) rgba(255, 255, 255, 0.08);
}

#chat-messages::-webkit-scrollbar {
  width: 8px;
}

#chat-messages::-webkit-scrollbar-thumb {
  background: rgba(247, 167, 65, 0.6);
  border-radius: 9999px;
}

#chat-messages::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 9999px;
}

/* Custom delivery method dropdown */
.delivery-dropdown {
  position: relative;
}

.delivery-dropdown-trigger {
  width: 100%;
  padding: 12px 16px;
  background-color: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  color: white;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.2s ease;
}

.delivery-dropdown-trigger:hover {
  background-color: rgba(255, 255, 255, 0.15);
  border-color: rgba(247, 167, 65, 0.3);
}

.delivery-dropdown-trigger.active {
  border-color: rgb(247, 167, 65);
  box-shadow: 0 0 0 2px rgba(247, 167, 65, 0.2);
}

.delivery-dropdown-arrow {
  transition: transform 0.2s ease;
  color: rgba(255, 255, 255, 0.5);
}

.delivery-dropdown-trigger.active .delivery-dropdown-arrow {
  transform: rotate(180deg);
  color: rgb(247, 167, 65);
}

.delivery-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background-color: #1a1a1a;
  border: 1px solid rgba(247, 167, 65, 0.3);
  border-radius: 8px;
  overflow: hidden;
  z-index: 1000;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  max-height: 0;
  opacity: 0;
  transform: translateY(-10px);
  transition: max-height 0.3s ease, opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
}

.delivery-dropdown-menu.active {
  max-height: min(300px, 50vh);
  /* Responsive max height */
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  /* Smooth scrolling on iOS */
  /* Custom scrollbar styling */
  scrollbar-width: thin;
  scrollbar-color: rgba(247, 167, 65, 0.5) rgba(255, 255, 255, 0.05);
}

/* Custom orange scrollbar for delivery dropdown (Webkit browsers) */
.delivery-dropdown-menu::-webkit-scrollbar {
  width: 5px;
}

.delivery-dropdown-menu::-webkit-scrollbar-thumb {
  background: rgba(247, 167, 65, 0.5);
  border-radius: 9999px;
}

.delivery-dropdown-menu::-webkit-scrollbar-thumb:hover {
  background: rgba(247, 167, 65, 0.7);
}

.delivery-dropdown-menu::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 9999px;
}

/* Mobile-specific adjustments for delivery dropdown */
@media (max-width: 768px) {
  .delivery-dropdown-menu.active {
    max-height: min(240px, 40vh);
    /* Smaller on mobile to prevent cut-off */
  }

  .delivery-dropdown-option {
    padding: 14px 16px;
    /* Slightly larger touch targets on mobile */
  }
}

.delivery-dropdown-option {
  padding: 12px 16px;
  color: white;
  cursor: pointer;
  transition: all 0.15s ease;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.delivery-dropdown-option:last-child {
  border-bottom: none;
}

.delivery-dropdown-option:hover {
  background-color: rgba(247, 167, 65, 0.15);
  color: rgb(247, 167, 65);
  padding-left: 20px;
}

.delivery-dropdown-option.selected {
  background-color: rgba(247, 167, 65, 0.25);
  color: rgb(247, 167, 65);
  font-weight: 600;
  position: relative;
}

.delivery-dropdown-option.selected::before {
  content: "✓";
  position: absolute;
  left: 16px;
  color: rgb(247, 167, 65);
}

.delivery-dropdown-option.selected {
  padding-left: 36px;
}

/* Hide native select (keep as fallback) */
#delivery-method-select {
  display: none;
}

/* ============================================
   Order page mobile layout fixes
   ============================================ */

/* On mobile, the chat container needs proper stacking */
@media (max-width: 767px) {

  /* Make chat container a proper stacking context on mobile */
  .chat-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
  }

  /* Chat section - fixed height on mobile so it can scroll */
  .chat-container>.flex-1 {
    flex: none !important;
    height: 60vh;
    min-height: 350px;
    max-height: 60vh;
  }

  /* The inner chat box needs to fill height and allow scrolling */
  .chat-container>.flex-1>.rounded-\[30px\] {
    height: 100%;
    display: flex;
    flex-direction: column;
  }

  /* Chat messages container needs proper constraints */
  .chat-container #chat-messages {
    flex: 1;
    min-height: 0;
    max-height: 100%;
    overflow-y: auto;
    /* Ensure scrollbar is always visible on mobile for discoverability */
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
  }

  /* The flex wrapper around chat messages */
  .chat-container>.flex-1>.rounded-\[30px\]>.flex-1 {
    flex: 1;
    min-height: 0;
    overflow: hidden;
  }

  /* Aside should not overlap - ensure it's positioned in flow */
  .chat-container>aside {
    position: relative;
    z-index: 1;
    width: 100%;
    flex-shrink: 0;
  }
}

/* Ensure chat messages scrollbar styling applies on mobile too */
@media (max-width: 767px) {
  #chat-messages::-webkit-scrollbar {
    width: 6px;
  }

  #chat-messages::-webkit-scrollbar-thumb {
    background: rgba(247, 167, 65, 0.7);
    border-radius: 9999px;
  }

  #chat-messages::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 9999px;
  }
}

/* ============================================
   CSS-only Skeleton Loader
   Add .skeleton class to elements while loading
   ============================================ */

.skeleton {
  position: relative;
  overflow: hidden;
  color: transparent !important;
  background: rgba(247, 167, 65, 0.12);
  border-radius: 6px;
  pointer-events: none;
  user-select: none;
}

/* Hide any text/content inside skeleton elements */
.skeleton * {
  visibility: hidden;
}

/* Shimmer animation sweep */
.skeleton::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg,
      transparent 0%,
      rgba(247, 167, 65, 0.25) 20%,
      rgba(255, 255, 255, 0.35) 50%,
      rgba(247, 167, 65, 0.25) 80%,
      transparent 100%);
  transform: translateX(-100%) skewX(-15deg);
  animation: skeleton-shimmer 1.8s ease-in-out infinite;
}

@keyframes skeleton-shimmer {
  0% {
    transform: translateX(-100%) skewX(-15deg);
  }

  100% {
    transform: translateX(100%) skewX(-15deg);
  }
}

/* Subtle pulse for extra visual feedback */
.skeleton::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(247, 167, 65, 0.08);
  border-radius: inherit;
  animation: skeleton-pulse 2s ease-in-out infinite;
}

@keyframes skeleton-pulse {

  0%,
  100% {
    opacity: 0;
  }

  50% {
    opacity: 1;
  }
}

/* Inline skeleton variant (for text within a line) */
.skeleton-inline {
  display: inline-block;
  min-width: 60px;
  min-height: 1em;
}

/* Rounded pill variant */
.skeleton-pill {
  border-radius: 9999px;
}

/* Fade out transition when skeleton is removed */
.skeleton-loaded {
  animation: skeleton-fade-out 0.3s ease-out forwards;
}

@keyframes skeleton-fade-out {
  from {
    opacity: 1;
  }

  to {
    opacity: 0;
  }
}

/* ============================================
   Blog Post Content Styles
   ============================================ */

/* Base prose styling for blog article content */
.prose {
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.75;
}

.prose>*+* {
  margin-top: 1.25em;
}

/* Headings */
.prose h1,
.prose h2,
.prose h3,
.prose h4,
.prose h5,
.prose h6 {
  font-family: var(--font-grifter);
  font-weight: bold;
  color: white;
  line-height: 1.25;
}

.prose h2 {
  font-size: 1.75rem;
  margin-top: 2.5em;
  margin-bottom: 1em;
}

.prose h3 {
  font-size: 1.375rem;
  margin-top: 2em;
  margin-bottom: 0.75em;
}

.prose h4 {
  font-size: 1.125rem;
  margin-top: 1.5em;
  margin-bottom: 0.5em;
}

@media (min-width: 768px) {
  .prose h2 {
    font-size: 2rem;
  }

  .prose h3 {
    font-size: 1.5rem;
  }

  .prose h4 {
    font-size: 1.25rem;
  }
}

/* Paragraphs */
.prose p {
  font-family: var(--font-inter-tight);
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.75;
  margin-bottom: 1.25em;
}

/* Links */
.prose a {
  color: rgb(247, 167, 65);
  text-decoration: none;
  transition: color 0.2s ease, text-decoration 0.2s ease;
}

.prose a:hover {
  text-decoration: underline;
  color: rgb(255, 190, 100);
}

/* Bold and strong */
.prose strong,
.prose b {
  color: white;
  font-weight: 600;
}

/* Italic */
.prose em,
.prose i {
  font-style: italic;
}

/* Lists */
.prose ul,
.prose ol {
  margin: 1.25em 0;
  padding-left: 1.5em;
}

.prose ul {
  list-style-type: disc;
}

.prose ol {
  list-style-type: decimal;
}

.prose li {
  font-family: var(--font-inter-tight);
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 0.5em;
  padding-left: 0.375em;
}

.prose li::marker {
  color: rgb(247, 167, 65);
}

.prose ul ul,
.prose ol ol,
.prose ul ol,
.prose ol ul {
  margin-top: 0.5em;
  margin-bottom: 0.5em;
}

/* Nested list markers */
.prose ul ul {
  list-style-type: circle;
}

.prose ul ul ul {
  list-style-type: square;
}

/* Blockquotes */
.prose blockquote {
  border-left: 4px solid rgb(247, 167, 65);
  padding-left: 1.5em;
  margin: 1.5em 0;
  font-style: italic;
  color: rgba(255, 255, 255, 0.7);
  background: rgba(247, 167, 65, 0.05);
  padding: 1em 1.5em;
  border-radius: 0 8px 8px 0;
}

.prose blockquote p {
  margin: 0;
}

.prose blockquote cite {
  display: block;
  margin-top: 0.75em;
  font-size: 0.875em;
  color: rgba(255, 255, 255, 0.5);
  font-style: normal;
}

/* Inline code */
.prose code {
  background: rgba(255, 255, 255, 0.1);
  padding: 0.125em 0.375em;
  border-radius: 4px;
  font-size: 0.875em;
  font-family: "Fira Code", "Consolas", "Monaco", monospace;
  color: rgb(247, 167, 65);
}

/* Code blocks */
.prose pre {
  background: rgba(0, 0, 0, 0.4);
  border-radius: 12px;
  padding: 1.25em;
  overflow-x: auto;
  margin: 1.5em 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.prose pre code {
  background: transparent;
  padding: 0;
  border-radius: 0;
  font-size: 0.875em;
  color: rgba(255, 255, 255, 0.9);
}

/* Horizontal rule */
.prose hr {
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  margin: 2.5em 0;
}

/* Images */
.prose img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  margin: 2em 0;
}

/* Figure with caption */
.prose figure,
.prose .blog-image {
  margin: 2em 0;
}

.prose figure img,
.prose .blog-image img {
  width: 100%;
  height: auto;
  border-radius: 12px;
  margin: 0;
}

.prose figcaption,
.prose .blog-image figcaption {
  margin-top: 0.75em;
  font-size: 0.875em;
  color: rgba(255, 255, 255, 0.5);
  text-align: center;
  font-family: var(--font-inter-tight);
}

/* Image grid */
.prose .blog-image-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin: 2em 0;
}

.prose .blog-image-grid img {
  width: 100%;
  height: auto;
  border-radius: 12px;
  margin: 0;
  aspect-ratio: 4/3;
  object-fit: cover;
}

@media (max-width: 640px) {
  .prose .blog-image-grid {
    grid-template-columns: 1fr;
  }
}

/* Tables */
.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 2em 0;
  font-size: 0.9375em;
}

.prose th,
.prose td {
  padding: 0.75em 1em;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.prose th {
  font-weight: 600;
  color: white;
  background: rgba(247, 167, 65, 0.1);
}

.prose tr:hover td {
  background: rgba(255, 255, 255, 0.03);
}

/* Video embeds */
.prose .video-embed,
.prose iframe[src*="youtube"],
.prose iframe[src*="vimeo"] {
  width: 100%;
  aspect-ratio: 16/9;
  border-radius: 12px;
  margin: 2em 0;
  border: none;
}

/* Callout boxes */
.prose .callout,
.prose .note,
.prose .tip,
.prose .warning {
  padding: 1em 1.25em;
  border-radius: 12px;
  margin: 1.5em 0;
  border-left: 4px solid;
}

.prose .note {
  background: rgba(59, 130, 246, 0.1);
  border-color: rgb(59, 130, 246);
}

.prose .tip {
  background: rgba(34, 197, 94, 0.1);
  border-color: rgb(34, 197, 94);
}

.prose .warning {
  background: rgba(234, 179, 8, 0.1);
  border-color: rgb(234, 179, 8);
}

.prose .callout {
  background: rgba(247, 167, 65, 0.1);
  border-color: rgb(247, 167, 65);
}

/* First paragraph larger (lead paragraph) */
.prose>p:first-of-type {
  font-size: 1.125em;
  line-height: 1.65;
}

/* Text selection */
.prose ::selection {
  background: rgba(247, 167, 65, 0.3);
  color: white;
}

/* Line clamping utility for blog cards */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Reading Progress Bar */
#reading-progress {
  box-shadow: 0 0 10px rgba(247, 167, 65, 0.5), 0 0 20px rgba(247, 167, 65, 0.3);
  pointer-events: none;
}