* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --primary: #0AB9C3;
  --primary-dark: #0898A3;
  --primary-light: #0CCBD7;
  --success: #0EAD69;
  --danger: #ef4444;
  --warning: #f59e0b;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --pwa-bar-height: 0px;
}

html.light {
  --bg: #F0F2F5;
  --bg-elevated: #ffffff;
  --text: #111b21;
  --text-secondary: #667781;
  --border: #e9edef;
  --surface: #ffffff;
  --surface-hover: #f5f6f6;
  --shadow-sm: 0 1px 4px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 2px 12px rgba(0, 0, 0, 0.12);
  --chat-bg: #f8fafc;
  --chat-bubble-in: #ffffff;
  --chat-bubble-out: #0AB9C3;
  --chat-bubble-out-text: #ffffff;
}

html.dark {
  --bg: #0b141a;
  --bg-elevated: #111b21;
  --text: #e9edef;
  --text-secondary: #8696a0;
  --border: #2a3942;
  --surface: #1f2c34;
  --surface-hover: #2a3942;
  --shadow-sm: 0 1px 4px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 1px 3px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 2px 12px rgba(0, 0, 0, 0.5);
  --chat-bg: #0b141a;
  --chat-bubble-in: #1f2c34;
  --chat-bubble-out: #0898A3;
  --chat-bubble-out-text: #ffffff;
}

html, body {
  height: 100%;
  overflow: hidden;
  position: fixed;
  width: 100%;
}

body {
  font-family: 'Beiruti', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  transition: background 0.2s ease, color 0.2s ease;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Main App Layout */
.app-container {
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  background: var(--bg);
  width: 100%;
}

/* Menu actions */
.menu-actions {
  display: grid;
  gap: 12px;
  padding: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.menu-action {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  height: 48px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--text);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

html.dark .menu-action {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

.menu-action:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.menu-action:active {
  transform: translateY(0);
}

.menu-action i {
  color: var(--primary);
  font-size: 18px;
}

/* Header (modernized: compact, glassmorphism, smooth animations) */
.app-header {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 8px 12px;
  padding-top: calc(8px + var(--safe-top));
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
  z-index: 10;
  gap: 8px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  min-height: 56px;
}

.app-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(10, 185, 195, 0.05), transparent);
  animation: header-sweep 8s ease-in-out infinite;
}

@keyframes header-sweep {
  0%, 100% { left: -100%; }
  50% { left: 100%; }
}

html.dark .app-header {
  background: rgba(31, 44, 52, 0.9);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

html.dark .app-header::before {
  background: linear-gradient(90deg, transparent, rgba(10, 185, 195, 0.1), transparent);
}

.header-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

[dir="rtl"] .header-left {
  flex-direction: row;
}

.back-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--text);
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  flex-shrink: 0;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.back-btn.active {
  display: flex;
}

.back-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.back-btn:active {
  transform: scale(0.95);
}

[dir="rtl"] .back-btn i {
  transform: scaleX(-1);
}

.store-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.store-logo {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  object-fit: cover;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.store-logo::after {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(45deg, var(--primary), var(--success), var(--warning));
  background-size: 300% 300%;
  border-radius: 14px;
  z-index: -1;
  animation: logo-glow 4s ease-in-out infinite;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.store-logo:hover {
  transform: scale(1.08) rotate(2deg);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.store-logo:hover::after {
  opacity: 0.8;
}

@keyframes logo-glow {
  0%, 100% {
    background-position: 0% 50%;
    opacity: 0.3;
  }
  50% {
    background-position: 100% 50%;
    opacity: 0.6;
  }
}

.store-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 1px;
  background: linear-gradient(135deg, var(--text), var(--primary));
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: name-shimmer 6s ease-in-out infinite;
  position: relative;
}

@keyframes name-shimmer {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.store-status {
  font-size: 12px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex;
  align-items: center;
  gap: 4px;
  position: relative;
}

.status-text {
  color: var(--success);
  font-weight: 600;
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success);
  animation: pulse-glow 2s infinite;
  box-shadow: 0 0 6px var(--success);
}

@keyframes pulse-glow {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
    box-shadow: 0 0 6px var(--success);
  }
  50% {
    opacity: 0.7;
    transform: scale(1.2);
    box-shadow: 0 0 12px var(--success), 0 0 20px rgba(16, 185, 129, 0.5);
  }
}

.header-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-shrink: 0;
}

.icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  flex-shrink: 0;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  overflow: hidden;
}

.icon-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

.icon-btn:hover::before {
  left: 100%;
}

.icon-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.05) rotate(5deg);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
  color: var(--text);
}

.icon-btn:active {
  transform: scale(0.95) rotate(0deg);
}

.icon-btn i {
  font-size: 16px;
  position: relative;
  z-index: 0;
  transition: transform 0.2s ease;
}

.icon-btn:hover i {
  transform: scale(1.1);
}

/* Special effect for language button */
#langBtn {
  background: linear-gradient(135deg, rgba(10, 185, 195, 0.1), rgba(12, 203, 215, 0.1));
  border: 1px solid rgba(10, 185, 195, 0.3);
  position: relative;
  transform-style: preserve-3d;
}

#langBtn::after {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(45deg, var(--primary), var(--primary-light), var(--success), var(--warning));
  background-size: 300% 300%;
  border-radius: 50%;
  z-index: -1;
  animation: rainbow-border 4s ease-in-out infinite;
  opacity: 0;
  transition: opacity 0.3s ease;
}

#langBtn:hover::after {
  opacity: 1;
}

#langBtn:hover {
  background: linear-gradient(135deg, rgba(10, 185, 195, 0.2), rgba(12, 203, 215, 0.2));
  transform: scale(1.05) rotate(5deg) translateZ(10px);
  box-shadow: 0 8px 25px rgba(10, 185, 195, 0.3);
}

@keyframes rainbow-border {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* Advanced floating particles with depth */
.app-header::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image:
    radial-gradient(circle at 20% 80%, rgba(10, 185, 195, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(12, 203, 215, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 40% 40%, rgba(14, 173, 105, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 60% 10%, rgba(245, 158, 11, 0.05) 0%, transparent 50%);
  background-size: 100px 100px, 150px 150px, 80px 80px, 120px 120px;
  background-position: 0% 0%, 100% 100%, 50% 50%, 75% 25%;
  animation: float-particles 20s ease-in-out infinite, particles-depth 15s ease-in-out infinite;
  pointer-events: none;
  z-index: -1;
}

@keyframes float-particles {
  0%, 100% {
    background-position: 0% 0%, 100% 100%, 50% 50%, 75% 25%;
    opacity: 0.3;
  }
  50% {
    background-position: 100% 100%, 0% 0%, 80% 20%, 25% 75%;
    opacity: 0.6;
  }
}

@keyframes particles-depth {
  0%, 100% { transform: perspective(1000px) rotateX(0deg); }
  25% { transform: perspective(1000px) rotateX(1deg); }
  75% { transform: perspective(1000px) rotateX(-1deg); }
}

/* Add some sparkle effects */
.icon-btn:nth-child(2)::before {
  animation-delay: 0.5s;
}

.icon-btn:nth-child(3)::before {
  animation-delay: 1s;
}

.icon-btn:nth-child(4)::before {
  animation-delay: 1.5s;
}

.icon-btn:nth-child(5)::before {
  animation-delay: 2s;
}

.badge {
  position: absolute;
  top: 4px;
  right: 4px;
  background: linear-gradient(135deg, var(--danger), #ff6b6b);
  color: white;
  font-size: 10px;
  padding: 1px 4px;
  border-radius: 8px;
  font-weight: 700;
  min-width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
  animation: badge-pulse 2s infinite;
  z-index: 2;
}

@keyframes badge-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

[dir="rtl"] .badge {
  right: auto;
  left: 6px;
}

/* View Container */
.view-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

.view {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.view.active {
  transform: translateX(0);
}

.view.prev {
  transform: translateX(-100%);
}

[dir="rtl"] .view {
  transform: translateX(-100%);
}

[dir="rtl"] .view.active {
  transform: translateX(0);
}

[dir="rtl"] .view.prev {
  transform: translateX(100%);
}

/* Chat View */
.chat-view {
  background: rgba(248, 250, 252, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

html.dark .chat-view {
  background: rgba(11, 20, 26, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 8px;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
}

.chat-date-divider {
  text-align: center;
  padding: 12px 0;
  position: sticky;
  top: 0;
  z-index: 1;
}

.date-badge {
  display: inline-block;
  background: var(--surface);
  color: var(--text-secondary);
  padding: 5px 12px;
  border-radius: 7.5px;
  font-size: 12.5px;
  font-weight: 500;
  box-shadow: var(--shadow-sm);
}

/* Messages */
.msg {
  display: flex;
  margin-bottom: 2px;
  padding: 0 8px;
  animation: messageSlide 0.2s ease-out;
}

@keyframes messageSlide {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.msg.out {
  justify-content: flex-end;
}

.msg.in {
  justify-content: flex-start;
}

.bubble {
  position: relative;
  display: inline-block;
  vertical-align: top;
  max-width: 85%;
  padding: 6px 8px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  line-height: 24px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
  word-wrap: break-word;
  word-break: break-word;
  overflow: visible;
}

.bubble .bubble-ts { 
  display: inline;
  margin-left: 8px;
  font-size: 11px; 
  color: rgba(0, 0, 0, 0.45);
  white-space: nowrap; 
  opacity: 0.7;
}

html.dark .bubble .bubble-ts {
  color: rgba(255, 255, 255, 0.5);
}

/* 15% font size increase for Latin characters in chat bubbles */
html:not([dir="rtl"]) .bubble {
  font-size: 18px;
}

.bubble.in {
  background: var(--chat-bubble-in) !important;
  color: var(--text);
}
.bubble.out {
  background: var(--chat-bubble-out) !important;
  color: var(--chat-bubble-out-text);
}

.bubble-content {
  display: flex;
  align-items: flex-end;
  gap: 0;
}

.bubble-text {
  white-space: pre-wrap;
  word-wrap: break-word;
  word-break: break-word;
  flex: 1;
}

[dir="rtl"] .bubble-text {
  padding-right: 0;
}

.bubble-footer {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 4px;
  margin-top: -2px;
}

.msg-time {
  font-size: 13px;
  font-weight: 600;
  color: rgba(0, 0, 0, 0.45);
  white-space: nowrap;
}

html.dark .msg-time {
  color: rgba(255, 255, 255, 0.5);
}

.bubble.in .msg-time {
  color: rgba(0, 0, 0, 0.45);
}

html.dark .bubble.in .msg-time {
  color: rgba(255, 255, 255, 0.45);
}

.bubble.out .msg-time {
  color: rgba(0, 0, 0, 0.5);
}

html.dark .bubble.out .msg-time {
  color: rgba(255, 255, 255, 0.6);
}

.bubble .bubble-content { 
  display: block; 
}

/* Header Add Me button styling */
.add-me-btn { display: inline-flex; gap:8px; align-items:center; padding:6px 10px; border-radius: 12px; background: transparent; border: 1px solid var(--primary); color: var(--primary); width: auto !important; }
.add-me-btn i { font-size: 18px; margin-right: 6px; }
.add-me-label { font-size: 13px; font-weight:700; color: inherit; }

/* Icon-only style for header add button */
.add-me-icon { background: transparent !important; border: none !important; padding: 6px !important; width: 44px !important; height: 44px !important; border-radius: 50% !important; display: inline-flex !important; align-items: center; justify-content: center; }
.add-me-icon i { font-size: 22px !important; color: var(--text-secondary); }

/* Cart items in chat bubble styling */
.bubble.out .cart-item-bg {
  background: rgba(0, 0, 0, 0.08);
}

html.dark .bubble.out .cart-item-bg {
  background: rgba(255, 255, 255, 0.1);
}

.bubble.out .cart-total-border {
  border-top-color: rgba(0, 0, 0, 0.15);
}

html.dark .bubble.out .cart-total-border {
  border-top-color: rgba(255, 255, 255, 0.2);
}


html.dark .bubble.out .msg-time {
  color: rgba(233, 237, 239, 0.6);
}

.msg-status {
  font-size: 16px;
  color: #53bdeb;
}

/* Typing Indicator */
.typing-indicator {
  display: flex;
  gap: 4px;
  padding: 8px 12px;
}

.typing-dot {
  width: 8px;
  height: 8px;
  background: var(--text-secondary);
  border-radius: 50%;
  animation: typing 1.4s infinite;
}

.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes typing {
  0%, 60%, 100% { opacity: 0.3; transform: scale(0.8); }
  30% { opacity: 1; transform: scale(1); }
}

/* Quick Reply Buttons */
.quick-replies {
  display: flex;
  gap: 8px;
  padding: 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.quick-replies::-webkit-scrollbar {
  display: none;
}

.quick-reply-btn {
  flex-shrink: 0;
  background: var(--surface);
  border: 1px solid var(--primary);
  color: var(--primary);
  padding: 8px 16px;
  border-radius: 18px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.quick-reply-btn:hover {
  background: var(--primary);
  color: white;
}

/* Chat Input */
.chat-input-container {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 8px;
  padding-bottom: calc(8px + var(--safe-bottom));
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  flex-shrink: 0;
}

html.dark .chat-input-container {
  background: rgba(31, 44, 52, 0.9);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.chat-input-wrapper {
  display: flex;
  gap: 6px;
  align-items: flex-end;
}

.chat-input {
  flex: 1;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  padding: 8px 12px;
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  outline: none;
  font-family: inherit;
  resize: none;
  max-height: 80px;
  overflow-y: auto;
  line-height: 22px;
  transition: all 0.2s ease;
}

.chat-input:focus {
  border-color: var(--primary);
  background: rgba(255, 255, 255, 0.15);
}

html.dark .chat-input {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.chat-input::placeholder {
  color: var(--text-secondary);
}

.send-btn {
  width: 36px;
  height: 36px;
  min-width: 36px;
  min-height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(10, 185, 195, 0.3);
}

.send-btn:hover {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(10, 185, 195, 0.4);
}

.send-btn:active {
  transform: scale(0.95);
}

.send-btn i {
  font-size: 20px;
}

[dir="rtl"] .send-btn i {
  transform: scaleX(-1);
}

/* Products View */
.products-view {
  background: var(--bg);
}

.search-bar {
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  position: sticky;
  top: 0;
  z-index: 5;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

html.dark .search-bar {
  background: rgba(31, 44, 52, 0.8);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

.search-input-wrapper {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 16px;
  display: flex;
  align-items: center;
  padding: 10px 16px;
  gap: 10px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

html.dark .search-input-wrapper {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

.search-input-wrapper:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(10, 185, 195, 0.15), 0 8px 25px rgba(10, 185, 195, 0.1);
  transform: translateY(-1px);
}

.search-input-wrapper i {
  color: var(--text-secondary);
  font-size: 18px;
  transition: color 0.2s ease;
}

.search-input-wrapper:focus-within i {
  color: var(--primary);
}

.search-input-wrapper input {
  flex: 1;
  border: none;
  background: transparent;
  color: var(--text);
  font-size: 16px;
  outline: none;
  font-family: inherit;
  font-weight: 500;
}

.search-input-wrapper input::placeholder {
  color: var(--text-secondary);
  font-weight: 400;
}

.categories-scroll {
  display: flex;
  gap: 8px;
  padding: 8px 12px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
}

.categories-scroll::-webkit-scrollbar {
  display: none;
}

.category-chip {
  flex-shrink: 0;
  padding: 6px 12px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.category-chip:hover {
  background: var(--surface-hover);
}

.category-chip.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.products-content {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  -webkit-overflow-scrolling: touch;
}

.products-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.products-count {
  font-size: 14px;
  color: var(--text-secondary);
  font-weight: 500;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 6px 12px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

html.dark .products-count {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 8px;
}

@media (max-width: 767px) {
  .product-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
  }
}

@media (min-width: 768px) {
  .product-grid {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
  }
}

@media (min-width: 1024px) {
  .product-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
  }
}

.product-card {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.3);
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
  position: relative;
}

html.dark .product-card {
  background: rgba(31, 44, 52, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

.product-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(10, 185, 195, 0.15);
  border-color: rgba(10, 185, 195, 0.4);
}

.product-card:active {
  transform: translateY(0);
}

.product-image-wrapper {
  position: relative;
  width: 100%;
  padding-top: 85%;
  background: var(--bg);
  overflow: hidden;
}

.product-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.product-card:hover .product-image {
  transform: scale(1.05);
}

.featured-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: linear-gradient(135deg, var(--warning), #f97316);
  color: white;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  gap: 4px;
}

[dir="rtl"] .featured-badge {
  left: auto;
  right: 8px;
}

.add-to-cart-btn {
  position: absolute;
  bottom: 12px;
  right: 12px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(10, 185, 195, 0.3);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 0;
  transform: scale(0.8) translateY(10px);
}

.product-card:hover .add-to-cart-btn {
  opacity: 1;
  transform: scale(1) translateY(0);
}

.add-to-cart-btn:hover {
  transform: scale(1.1) translateY(-2px);
  box-shadow: 0 6px 20px rgba(10, 185, 195, 0.4);
}

.add-to-cart-btn:active {
  transform: scale(0.95) translateY(0);
}

.product-price {
  font-size: 17px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.product-info {
  padding: 8px;
}

.product-name {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.3;
  color: var(--text);
}

.product-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.stock-badge {
  font-size: 11px;
  color: var(--danger);
  background: rgba(239, 68, 68, 0.1);
  padding: 4px 8px;
  border-radius: 12px;
  font-weight: 600;
}

/* Cart Item */
.cart-item {
  display: flex;
  gap: 12px;
  padding: 12px;
  background: var(--bg);
  border-radius: 12px;
  margin-bottom: 8px;
}

.cart-item-image {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
}

.cart-item-info {
  flex: 1;
  min-width: 0;
}

.cart-item-name {
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 4px;
}

.cart-item-price {
  color: var(--text-secondary);
  font-size: 13px;
}

.cart-item-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

.qty-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s;
}

.qty-btn:hover {
  background: var(--surface-hover);
}

.qty-display {
  min-width: 32px;
  text-align: center;
  font-weight: 600;
}

.remove-btn {
  margin-left: auto;
  color: var(--danger);
  background: transparent;
  border: none;
  padding: 4px 8px;
  cursor: pointer;
  font-size: 14px;
}

[dir="rtl"] .remove-btn {
  margin-left: 0;
  margin-right: auto;
}

/* Bottom Sheet */
.bottom-sheet {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg-elevated);
  border-radius: 16px 16px 0 0;
  box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.15);
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  z-index: 100;
}

.bottom-sheet.active {
  transform: translateY(0);
}

.sheet-handle {
  width: 36px;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  margin: 8px auto;
}

.sheet-header {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.sheet-title {
  font-size: 18px;
  font-weight: 700;
}

.sheet-subtitle {
  font-size: 13px;
  color: var(--text-secondary);
}

.sheet-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
}

.sheet-footer {
  padding: 16px;
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding-bottom: calc(16px + var(--safe-bottom));
}

/* Cart Review Modal - Compact Design */
.cart-review-modal .cart-review-header {
  padding: 10px 14px;
  border-bottom: 2px solid var(--primary);
  display: flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark, var(--primary)) 100%);
  color: white;
}

.cart-review-modal .header-icon {
  font-size: 24px;
  line-height: 1;
}

.cart-review-modal .sheet-title {
  font-size: 16px;
  font-weight: 700;
  color: white;
  margin: 0;
}

.cart-review-modal .sheet-subtitle {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.85);
  margin: 0;
}

.cart-review-modal .sheet-body {
  padding: 10px;
}

.review-section {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 10px;
  margin-bottom: 8px;
}

.review-section.customer-section {
  border-left: 3px solid var(--primary);
  background: linear-gradient(90deg, rgba(var(--primary-rgb, 76, 175, 80), 0.05) 0%, var(--bg) 100%);
}

.section-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 6px;
}

.customer-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--primary);
}

.info-grid {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.info-grid > div {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  padding: 4px 0;
}

.info-grid > div:not(:last-child) {
  border-bottom: 1px dashed var(--border);
  padding-bottom: 6px;
}

.info-grid i {
  width: 16px;
  font-size: 12px;
  color: var(--text-secondary);
  text-align: center;
}

.products-grid {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.total-section {
  background: var(--primary);
  color: white;
  border-radius: 6px;
  padding: 10px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 2px 8px rgba(var(--primary-rgb, 76, 175, 80), 0.3);
}

.total-label {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1px;
}

.total-amount {
  font-size: 20px;
  font-weight: 900;
}

.cart-review-modal .sheet-footer {
  padding: 10px;
  display: flex;
  gap: 8px;
  border-top: 2px solid var(--border);
}

.cart-btn {
  flex: 1;
  padding: 10px 12px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s;
}

.cart-btn i {
  font-size: 14px;
}

.cancel-btn {
  background: #fff;
  color: #ef4444;
  border: 1.5px solid #ef4444;
}

.cancel-btn:hover {
  background: #fef2f2;
}

.update-btn {
  background: var(--surface);
  color: var(--primary);
  border: 1.5px solid var(--primary);
}

.update-btn:hover {
  background: var(--bg);
}

.accept-btn {
  flex: 1.5;
  background: var(--primary);
  color: white;
  border: 1.5px solid var(--primary);
  box-shadow: 0 2px 6px rgba(var(--primary-rgb, 76, 175, 80), 0.4);
}

/* 20% font size increase for Latin characters in cart modal */
html:not([dir="rtl"]) .cart-review-modal .sheet-title {
  font-size: 19px; /* 16px * 1.20 */
}

html:not([dir="rtl"]) .cart-review-modal .sheet-subtitle {
  font-size: 13px; /* 11px * 1.20 */
}

html:not([dir="rtl"]) .cart-review-modal .section-label {
  font-size: 12px; /* 10px * 1.20 */
}

html:not([dir="rtl"]) .cart-review-modal .customer-name {
  font-size: 18px; /* 15px * 1.20 */
}

html:not([dir="rtl"]) .cart-review-modal .info-grid > div {
  font-size: 16px; /* 13px * 1.20 */
}

html:not([dir="rtl"]) .cart-review-modal .info-grid i {
  font-size: 14px; /* 12px * 1.20 */
}

html:not([dir="rtl"]) .cart-review-modal .total-label {
  font-size: 16px; /* 13px * 1.20 */
}

html:not([dir="rtl"]) .cart-review-modal .total-amount {
  font-size: 24px; /* 20px * 1.20 */
}

html:not([dir="rtl"]) .cart-review-modal .cart-btn {
  font-size: 16px; /* 13px * 1.20 */
}

html:not([dir="rtl"]) .cart-review-modal .cart-btn i {
  font-size: 17px; /* 14px * 1.20 */
}

/* Product items in cart modal - override inline styles */
html:not([dir="rtl"]) .cart-review-modal .products-grid > div > div:first-child > div:first-child {
  font-size: 16px !important; /* 13px * 1.20 - product name */
}

html:not([dir="rtl"]) .cart-review-modal .products-grid > div > div:first-child > div:last-child {
  font-size: 13px !important; /* 11px * 1.20 - price each */
}

html:not([dir="rtl"]) .cart-review-modal .products-grid > div > div:last-child {
  font-size: 17px !important; /* 14px * 1.20 - total price */
}

.accept-btn:hover {
  background: var(--primary-dark, var(--primary));
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(var(--primary-rgb, 76, 175, 80), 0.5);
}

.cart-btn:active {
  transform: scale(0.97);
}

/* Cart Summary */
.cart-summary {
  background: var(--bg);
  padding: 16px;
  border-radius: 12px;
  margin-bottom: 12px;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.summary-label {
  font-size: 14px;
  color: var(--text-secondary);
}

.summary-value {
  font-size: 16px;
  font-weight: 700;
}

.total-row {
  padding-top: 12px;
  border-top: 1px solid var(--border);
  margin-top: 4px;
}

.total-value {
  font-size: 24px;
  font-weight: 900;
  color: var(--primary);
}

/* Primary Button */
.btn-primary {
  width: 100%;
  padding: 14px;
  border-radius: 12px;
  background: var(--primary);
  color: white;
  border: none;
  font-weight: 700;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-primary:hover {
  background: var(--primary-dark);
}

.btn-primary:active {
  transform: scale(0.98);
}

/* Overlay */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 99;
  display: none;
  animation: fadeIn 0.2s ease;
}

.overlay.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Empty State */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 25vh;
  padding: 40px 20px;
}

.empty-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  width: 80px;
  height: 80px;
  border-radius: 20px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  box-shadow: 0 8px 25px rgba(10, 185, 195, 0.3);
  position: relative;
}

.empty-icon::after {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 22px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  z-index: -1;
  opacity: 0.3;
  filter: blur(8px);
}

.empty-icon i {
  color: white;
  font-size: 32px;
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-6px); }
}

@media (min-width: 768px) {
  .empty-state { min-height: 35vh; }
  .empty-icon { width: 96px; height: 96px; }
  .empty-icon i { font-size: 40px; }
  .empty-title { font-size: 22px; }
  .empty-description { font-size: 16px; }
}

.empty-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--text);
}

.empty-description {
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 16px;
}

/* Notification Toast */
.notification {
  position: fixed;
  top: calc(16px + var(--safe-top));
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  padding: 12px 20px;
  border-radius: 24px;
  color: white;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  animation: slideDown 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  max-width: calc(100% - 32px);
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
}

@keyframes slideDown {
  from { 
    opacity: 0; 
    transform: translateX(-50%) translateY(-20px); 
  }
  to { 
    opacity: 1; 
    transform: translateX(-50%) translateY(0); 
  }
}

.notification.success { background: var(--success); }
.notification.error { background: var(--danger); }
.notification.info { background: #3b82f6; }
.notification.warning { background: var(--warning); }

/* Contact Form */
.contact-form {
  display: grid;
  gap: 16px;
}

.form-group {
  display: grid;
  gap: 8px;
}

.form-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
}

.form-input {
  padding: 12px 16px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 15px;
  outline: none;
  font-family: inherit;
  transition: border-color 0.2s;
}

.form-input:focus {
  border-color: var(--primary);
}

.form-error {
  color: var(--danger);
  font-size: 13px;
  display: none;
}

/* Action Buttons */
.action-btns {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.action-btn {
  flex: 1;
  min-width: 100px;
  padding: 8px 16px;
  border-radius: 8px;
  border: 1px solid var(--primary);
  background: transparent;
  color: var(--primary);
  font-weight: 700;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.2s;
}

.action-btn:hover {
  background: var(--primary);
  color: white;
}

.action-btn.primary {
  background: var(--primary);
  color: white;
}

.action-btn.primary:hover {
  background: var(--primary-dark);
}

/* Categories Grid */
.categories-grid {
  display: grid;
  gap: 8px;
  padding: 12px;
}

.category-btn {
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-align: start;
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
  position: relative;
  overflow: hidden;
  min-height: 44px;
}

html.dark .category-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

.category-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(10, 185, 195, 0.1), transparent);
  transition: left 0.5s ease;
}

.category-btn:hover::before {
  left: 100%;
}

.category-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 20px rgba(10, 185, 195, 0.15);
  border-color: rgba(10, 185, 195, 0.3);
}

.category-btn:active {
  transform: translateY(0) scale(0.98);
}

.category-btn.active {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white;
  border-color: var(--primary);
  box-shadow: 0 8px 25px rgba(10, 185, 195, 0.3);
}

.category-btn.active::before {
  display: none;
}

.category-icon {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.category-btn.active .category-icon {
  opacity: 1;
  transform: scale(1.2);
}

/* Scrollbar */
.scrollbar::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

.scrollbar::-webkit-scrollbar-track {
  background: transparent;
}

.scrollbar::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}

.scrollbar::-webkit-scrollbar-thumb:hover {
  background: var(--text-secondary);
}

/* Floating Action Button */
.fab {
  position: fixed;
  bottom: calc(24px + var(--safe-bottom));
  right: 24px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
  cursor: pointer;
  z-index: 50;
  transition: all 0.3s;
}

.fab:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 16px rgba(37, 211, 102, 0.5);
}

.fab:active {
  transform: scale(0.95);
}

.fab i {
  font-size: 24px;
}

[dir="rtl"] .fab {
  right: auto;
  left: 24px;
}

/* Loading Overlay */
.loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.32);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.loading-card {
  background: var(--bg-elevated);
  padding: 18px 20px;
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
  min-width: 200px;
}
.loader {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 3px solid rgba(0,0,0,0.08);
  border-top-color: var(--primary);
  animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-title {
  font-weight: 800;
  color: var(--text);
  font-size: 15px;
  text-align: center;
}
.loading-sub {
  font-size: 13px;
  color: var(--text-secondary);
  text-align: center;
}

/* Success SVG animation */
.loader-spinner { display:flex; align-items:center; justify-content:center; }
.success-svg { width:72px; height:72px; display:block; }
.success-svg circle { fill: none; stroke: var(--primary); stroke-width:3; stroke-linecap:round; stroke-linejoin:round; stroke-dasharray: 220; stroke-dashoffset: 220; transition: stroke-dashoffset 700ms cubic-bezier(.2,.8,.2,1); }
.success-svg .check { fill: none; stroke: white; stroke-width:3; stroke-linecap:round; stroke-linejoin:round; stroke-dasharray: 80; stroke-dashoffset: 80; transition: stroke-dashoffset 420ms cubic-bezier(.2,.8,.2,1) 520ms; }
.success-bg { fill: var(--primary); opacity:0; transform-origin:center; transform: scale(0.2); transition: transform 420ms cubic-bezier(.2,.8,.2,1), opacity 420ms; }
.success-play .success-bg { opacity: 1; transform: scale(1); }
.success-play circle { stroke-dashoffset: 0; }
.success-play .check { stroke-dashoffset: 0; }

/* Fade overlay */
.loading-overlay.fade { opacity: 0; transition: opacity 360ms ease; }
