/* ===================================================================
   متجر لورزو | Lorzo Store - ملف الأنماط والتنسيقات الرئيسية (CSS)
   Palette: Luxury Obsidian Cyber Emerald (#060807, #0d1310, #00f59b)
   =================================================================== */

/* -------------------------------------------------------------------
   1. إعدادات التمرير العام والخلفية السوداء الملكية الفاخرة (Deep Obsidian Black)
   ------------------------------------------------------------------- */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
  overflow-anchor: none;
}

body {
  font-family: 'Cairo', sans-serif;
  background-color: #060807;
  background-image: 
    radial-gradient(circle 900px at 50% 120px, rgba(0, 245, 155, 0.12), transparent 70%),
    radial-gradient(circle 800px at 92% 35%, rgba(0, 200, 120, 0.06), transparent 60%),
    radial-gradient(circle 850px at 8% 65%, rgba(0, 245, 155, 0.06), transparent 65%),
    radial-gradient(circle 1000px at 50% 100%, rgba(0, 200, 120, 0.09), transparent 70%),
    linear-gradient(180deg, #050706 0%, #080c0a 50%, #050706 100%);
  background-attachment: fixed;
  background-repeat: no-repeat;
  color: #f1f5f9;
  overflow-x: clip;
  overflow-anchor: none;
  min-height: 100vh;
}

@supports not (overflow-x: clip) {
  body {
    overflow-x: hidden;
  }
}

::selection {
  background: #00f59b;
  color: #050706;
}

/* -------------------------------------------------------------------
   2. شريط التمرير المخصص بنمط سلة الزمردي (Salla Emerald Scrollbar)
   ------------------------------------------------------------------- */
::-webkit-scrollbar {
  width: 7px;
}

::-webkit-scrollbar-track {
  background: #050706;
}

::-webkit-scrollbar-thumb {
  background: #142018;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #00f59b;
}

/* -------------------------------------------------------------------
   3. بطاقات المتجر والأسطح الزجاجية الفاخرة (Luxury Obsidian Glass Cards)
   ------------------------------------------------------------------- */
.store-card {
  background: linear-gradient(145deg, rgba(13, 19, 16, 0.92) 0%, rgba(8, 12, 10, 0.96) 100%);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(0, 245, 155, 0.14);
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.85), inset 0 1px 0 rgba(0, 245, 155, 0.08);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.store-card:hover {
  border-color: rgba(0, 245, 155, 0.45);
  box-shadow: 0 16px 36px -10px rgba(0, 0, 0, 0.92), 0 0 25px -4px rgba(0, 245, 155, 0.22);
}

/* -------------------------------------------------------------------
   4. خلفية النوافذ المنبثقة (Modal Backdrop)
   ------------------------------------------------------------------- */
.modal-backdrop {
  background-color: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(6px);
}

/* -------------------------------------------------------------------
   5. الحركات والتأثيرات الحركية (Keyframes & Animations)
   ------------------------------------------------------------------- */

/* حركة الظهور السينمائي الناعمة للموقع عند التحميل (Fade-in نقي دون أي إزاحة رأسية لمنع انزلاق الصفحة عند التحديث) */
@keyframes siteEntrance {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

.site-entrance {
  animation: siteEntrance 0.35s ease-out forwards;
}

/* حركة التلاشي والانتقال السلس بين الأقسام */
@keyframes viewFadeIn {
  0% {
    opacity: 0;
    transform: translateY(8px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.view-fade-in {
  animation: viewFadeIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* حركة الاهتزاز الناعم عند حدوث خطأ في الإدخال */
@keyframes smoothShake {
  0%, 100% {
    transform: translateX(0);
  }
  20%, 60% {
    transform: translateX(-5px);
  }
  40%, 80% {
    transform: translateX(5px);
  }
}

.shake-error {
  animation: smoothShake 0.35s ease-in-out;
  border-color: #ef4444 !important;
  box-shadow: 0 0 14px rgba(239, 68, 68, 0.3) !important;
}

/* حركة الانزلاق وظهور رسائل الخطأ للحقول */
@keyframes slideFadeDown {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.field-error-msg {
  animation: slideFadeDown 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* حركات الإشعارات المنبثقة (Toast Notifications) */
@keyframes toastSlideIn {
  from {
    opacity: 0;
    transform: translateY(-16px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes toastFadeOut {
  from {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  to {
    opacity: 0;
    transform: translateY(-12px) scale(0.96);
  }
}

.toast-enter {
  animation: toastSlideIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.toast-exit {
  animation: toastFadeOut 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* حركة الانزلاق الناعم للنوافذ المنبثقة */
@keyframes modalSlideDown {
  from {
    opacity: 0;
    transform: translateY(-24px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.auth-modal-content {
  animation: modalSlideDown 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* -------------------------------------------------------------------
   6. تحسينات التجاوب الشاملة للجوالات والآيباد (Mobile & iPad Optimizations)
   ------------------------------------------------------------------- */

/* منع تكبير الشاشة التلقائي المزعج في متصفح Safari على أجهزة iPhone/iPad عند النقر على الحقول */
@media screen and (max-width: 768px) {
  input[type="text"],
  input[type="email"],
  input[type="password"],
  select,
  textarea {
    font-size: 16px !important;
  }
}

/* تحسين استجابة اللمس وإلغاء تأخير الـ 300ms على شاشات اللمس للهواتف والتابلت */
@media (pointer: coarse) {
  button, 
  a, 
  input[type="submit"], 
  input[type="button"] {
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
  }
}

/* شريط تمرير ناعم ومخفي داخل النوافذ المنبثقة على الجوال */
.auth-modal-content::-webkit-scrollbar {
  width: 5px;
}
.auth-modal-content::-webkit-scrollbar-track {
  background: transparent;
}
.auth-modal-content::-webkit-scrollbar-thumb {
  background: #18261e;
  border-radius: 4px;
}

/* -------------------------------------------------------------------
   7. مربعات رمز التحقق OTP (Verification Code Inputs & Banner)
   ------------------------------------------------------------------- */
#otpInputsGroup {
  direction: ltr !important;
}

.otp-digit {
  direction: ltr !important;
  text-align: center;
  caret-color: #00f59b;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.otp-digit:focus {
  border-color: #00f59b !important;
  box-shadow: 0 0 16px rgba(0, 245, 155, 0.35), inset 0 0 8px rgba(0, 245, 155, 0.08);
  transform: translateY(-2px);
  background-color: rgba(0, 245, 155, 0.05) !important;
}

.otp-digit.filled {
  border-color: rgba(0, 245, 155, 0.65);
  background-color: rgba(0, 245, 155, 0.06);
  color: #00f59b;
}

.otp-mail-banner {
  animation: toastSlideIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* دعم فتح القوائم المنسدلة باللمس لأجهزة الآيباد والتابلت */
.touch-open {
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
}

/* -------------------------------------------------------------------
   8. ضبط توسيط أيقونات حقول الإدخال بدقة متناهية على الجوال والحاسوب
   ------------------------------------------------------------------- */
.auth-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.auth-input-icon {
  position: absolute;
  right: 14px;
  top: 50% !important;
  transform: translateY(-50%) !important;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  color: #94a3b8;
  font-size: 13px;
  line-height: 1;
  z-index: 2;
}


