/* Login page styles — extracted from login.html inline <style> blocks.
 *
 * Shared pieces (gradient, * reset, [hidden], body touch-action, shared vars)
 * are loaded from:
 *   - /assets/css/common/site-base.css
 *   - /assets/css/mf-background.css
 *
 * The page body uses Poppins + Cairo as the base font (still loaded via
 * Google Fonts in the HTML <head>). Cormorant Garamond is layered on top
 * of a few specific elements for typographic consistency with the rest of
 * the site — see the section at the bottom of this file.
 */

.bottom-close {
  width: 100%;
  display: flex;
  justify-content: center;
  margin-top: 20px;
  padding-bottom: 20px;
}

.bottom-close a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  background: rgba(0, 0, 0, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  color: #94621c; /* البرونزي */
  font-size: 22px;
  font-weight: bold;
  text-decoration: none;
  transition: all 0.25s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.bottom-close a:hover {
  background: #94621c;
  color: #fff;
  transform: scale(1.08);
  box-shadow: 0 0 12px rgba(148, 98, 28, 0.6);
}

/* 🔒 تعطيل تأثير اللمس ومربعات التحديد في المتصفح */
* {
  -webkit-tap-highlight-color: transparent; /* يخفي المربع الأزرق عند اللمس */
  outline: none; /* يخفي الإطار الأزرق عند التركيز */
  user-select: none; /* يمنع التحديد باللمس */
  -webkit-user-select: none;
  -ms-user-select: none;
}

/* لو بدك الزر يضل قابل للنقر والتفاعل الطبيعي */
button,
input,
select,
textarea,
a {
  -webkit-tap-highlight-color: transparent;
  outline: none;
  user-select: none;
}

:root {
  --bronze: #94621c;
  --bronze-2: #b9822e;
  --ink: #0d0f14;
  --panel: #ffffff;
  --muted: #70757d;
  --line: rgba(0, 0, 0, 0.08);
}

* {
  box-sizing: border-box;
}

/* html+body base: block touch drag, disable overscroll, full height */
html,
body {
  height: 100%;
  margin: 0;
  overscroll-behavior: none;
  touch-action: manipulation;
}

/* خلفية متدرجة مطابقة لهوية الموقع */
body {
  font-family:
    'Poppins',
    'Cairo',
    system-ui,
    -apple-system,
    Segoe UI,
    Roboto,
    Arial,
    sans-serif;
  background: linear-gradient(
    150deg,
    #06080c 0%,
    #0a0f1a 15%,
    #3a3f46 40%,
    #94621c 70%,
    #f2e8d8 100%
  );
  background-attachment: fixed;
  color: #111;
  display: grid;
  place-items: center;
  padding: 24px;
}

/* بطاقة الفورم البيضاء */
.card {
  width: min(520px, 94vw);
  background: var(--panel);
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.25);
  padding: 20px;
  border: 1px solid rgba(148, 98, 28, 0.18);
  overflow: hidden;
}

/* التبويبات */
.tabs {
  display: flex;
  gap: 8px;
  background: rgba(148, 98, 28, 0.08);
  padding: 6px;
  border-radius: 12px;
  margin-bottom: 14px;
}
.tab {
  flex: 1;
  padding: 10px 14px;
  border-radius: 10px;
  cursor: pointer;
  background: transparent;
  border: 1px solid transparent;
  font-weight: 700;
  color: #333;
  transition: 0.2s;
}
.tab[aria-selected='true'] {
  background: var(--bronze);
  color: #fff;
  border-color: var(--bronze);
  box-shadow: 0 8px 18px rgba(148, 98, 28, 0.35);
}

.title {
  margin: 8px 2px 14px;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: 0.3px;
  color: #1b1e24;
}
.sub {
  margin: -6px 2px 14px;
  color: var(--muted);
  font-size: 0.96rem;
}

.grid {
  display: grid;
  gap: 12px;
}
.input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  font-size: 15px;
  outline: 0;
  transition:
    0.15s border-color,
    0.15s box-shadow;
}
.input:focus {
  border-color: var(--bronze);
  box-shadow: 0 0 0 3px rgba(148, 98, 28, 0.18);
}

.primary {
  width: 100%;
  padding: 12px;
  border-radius: 12px;
  background: var(--bronze);
  color: #fff;
  border: 1px solid var(--bronze);
  font-weight: 800;
  cursor: pointer;
  transition:
    0.18s transform,
    0.18s filter;
}
.primary:hover {
  filter: brightness(1.05);
}
.primary:active {
  transform: translateY(1px);
}

.hr {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #666;
  margin: 6px 0 2px;
}
.hr::before,
.hr::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #e9e9ec;
}

.providers {
  display: grid;
  gap: 10px;
}

.google-btn {
  width: 100%;
  border-radius: 12px;
  background: #fff;
  color: #202124;
  border: 1px solid #dadce0;
  display: flex;
  align-items: center; /* يضبط المحاذاة */
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  font-weight: 700;
  height: 48px; /* يحل المشكلة */
  padding: 0 14px; /* يخلي الزر مضبوط */
}

/* إصلاح الأيقونة */
.google-btn svg {
  width: 20px;
  height: 20px;
  display: block;
}

.row {
  display: flex;
  gap: 6px;
  justify-content: center;
  margin-top: 10px;
  color: #555;
  font-size: 0.95rem;
}
.link {
  color: var(--bronze);
  font-weight: 800;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* لوحين تسجيل الدخول والتسجيل */
.panel[hidden] {
  display: none;
}

/* تذييل صغير */
.foot {
  margin-top: 16px;
  text-align: center;
  color: #6b7280;
  font-size: 0.85rem;
}

/* ===== Forgot Password Modal ===== */

/* خلفية تغطي الشاشة */
.fp-backdrop {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(6px);
  z-index: 1000;
}
.fp-backdrop.show {
  display: flex;
}

/* زر إغلاق (X) */
.fp-close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.14);
  cursor: pointer;
  transition: 0.2s;
}
.fp-close:hover {
  transform: scale(1.06);
}

/* بطاقة النموذج (من Uiverse — مع تعديلات بسيطة) */
.form-container {
  max-width: 400px;
  width: min(92vw, 400px);
  background-color: #fff;
  padding: 32px 24px;
  font-size: 14px;
  font-family: inherit;
  color: #212121;
  display: flex;
  flex-direction: column;
  gap: 20px;
  box-sizing: border-box;
  border-radius: 12px;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.28);
  position: relative; /* لزر الإغلاق */
}

.form-container button:active {
  transform: scale(0.98);
}

.form-container .logo-container {
  text-align: center;
  font-weight: 700;
  font-size: 18px;
}

.form-container .form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.form-container .form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.form-container .form-group label {
  margin-bottom: 2px;
  font-weight: 600;
}
.form-container .form-group input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  font-family: inherit;
  border: 1px solid #dcdde1;
}
.form-container .form-group input::placeholder {
  opacity: 0.6;
}
.form-container .form-group input:focus {
  outline: none;
  border-color: #94621c;
  box-shadow: 0 0 0 3px rgba(148, 98, 28, 0.16);
}

.form-container .form-submit-btn {
  display: flex;
  justify-content: center;
  align-items: center;
  color: #fff;
  background-color: #94621c;
  border: none;
  width: 100%;
  padding: 12px 16px;
  font-weight: 800;
  gap: 8px;
  margin: 6px 0;
  cursor: pointer;
  border-radius: 12px;
  box-shadow: 0 8px 22px rgba(148, 98, 28, 0.28);
}
.form-container .form-submit-btn:hover {
  filter: brightness(1.05);
}

.form-container .signup-link {
  align-self: center;
  font-weight: 500;
}
.form-container .link {
  color: #1778f2;
  text-decoration: none;
}
.form-container .link:hover {
  text-decoration: underline;
}

/* رسائل حالة */
.fp-msg {
  font-size: 13px;
  line-height: 1.5;
}
.fp-msg.success {
  color: #0b7a23;
}
.fp-msg.error {
  color: #b00020;
}

/* ✅ تخطيط عادي مع هيدر ثابت + سكرول */
body {
  min-height: 100vh;
  padding: 96px 16px 40px; /* مساحة تحت الهيدر وفوق زر X */
  display: block;
}

/* الكارت بالنص بشكل طبيعي */
.card {
  margin: 0 auto;
  max-width: min(520px, 94vw);
}

/* زر الإغلاق السفلي ما يدفش المحتوى — خلّيه ثابت */
.bottom-close {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 16px;
  margin: 0;
  padding: 0;
  width: auto;
  z-index: 10;
}

/* تحسينات موبايل صغيرة */
@media (max-width: 480px) {
  body {
    padding: 12px;
  }
  .card {
    max-width: 92vw;
  }
}

/* ✨ حركة فخمة للكارت عند الظهور */
@keyframes fadeSlideUp {
  from {
    opacity: 0;
    transform: translateY(40px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* تطبيق الحركة عند تحميل الصفحة */
.card {
  animation: fadeSlideUp 0.8s ease-out both;
}

/* لما يبدل المستخدم بين Log In / Sign Up */
.panel {
  animation: fadeSlideUp 0.4s ease-out both;
}

/* ✅ حل مشكلة الخط الأبيض بأسفل الشاشة (لكل الصفحات) */
html,
body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  background: linear-gradient(
    150deg,
    #06080c 0%,
    #0a0f1a 15%,
    #3a3f46 40%,
    #94621c 70%,
    #f2e8d8 100%
  );
  background-attachment: fixed;
  background-repeat: no-repeat;
  background-size: cover;
  overflow-x: hidden;
}

/* ===== Toast (bottom fixed, tidy, RTL/LTR) ===== */
.toast {
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%) translateY(12px);
  min-width: min(92vw, 560px);
  max-width: 92vw;
  padding: 12px 14px;
  border-radius: 12px;
  background: #fee2e2; /* error base */
  color: #7f1d1d;
  border: 1px solid #fecaca;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.18);
  opacity: 0;
  pointer-events: none;
  transition: 0.28s ease;
  font-weight: 700;
  text-align: center;
  z-index: 9999;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}
.toast.success {
  background: #dcfce7;
  color: #166534;
  border-color: #bbf7d0;
}
html[dir='rtl'] .toast {
  direction: rtl;
}
html[dir='ltr'] .toast {
  direction: ltr;
}

/* حركة بسيطة */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translate(-50%, 20px);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}
input[type='email'],
input[type='password'],
input[name],
textarea {
  user-select: auto;
  -webkit-user-select: auto;
  -ms-user-select: auto;
}

/* ✅ Fix: allow full page height + keep footer at bottom */
html,
body {
  height: auto !important;
  min-height: 100% !important;
  overflow-x: hidden;
  overflow-y: auto;
}

body {
  min-height: 100dvh !important; /* المهم هون */
  display: flex !important;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  background-attachment: scroll !important;
  padding-bottom: 40px !important; /* خففناها */
}

/* الكارد ياخد المساحة الفاضية ويدفش الفوتر */
.card {
  flex: 1 0 auto !important;
  margin: 0 auto !important;
}

/* الفوتر يضل بآخر الصفحة */
#globalFooter {
  margin-top: auto !important;
}

/* === FIX: mobile one-finger scroll (Chrome / Android / WebView) === */
html,
body {
  height: auto !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;

  -webkit-overflow-scrolling: touch !important;
  overscroll-behavior-y: auto !important;

  touch-action: pan-y !important;
}

/* تأكيد أن كل العناصر تسمح بالسحب العمودي */
body,
body * {
  touch-action: pan-y !important;
}

/* ========== Cormorant Garamond accents on titles + CTAs ========== */
.logo-container,
.tab,
.title,
.panel .title {
  font-family: 'Cormorant Garamond', 'Poppins', 'Cairo', serif;
  font-optical-sizing: auto;
  letter-spacing: 0.3px;
}

.logo-container {
  font-weight: 500;
}

.tab {
  font-size: 20px;
  font-weight: 600;
  padding: 12px 14px;
}

.title,
.panel .title {
  font-weight: 500;
  font-size: clamp(26px, 3.5vw, 34px);
  letter-spacing: 0.5px;
}

/* Subtitle paragraph (".sub") — matches booking/services intro styling */
.sub,
.form-subtitle,
.subtitle {
  font-family: 'Cormorant Garamond', 'Poppins', 'Cairo', serif;
  font-optical-sizing: auto;
  font-style: italic;
  font-weight: 400;
  font-size: clamp(15px, 1.6vw, 17px);
}

.form-submit-btn,
.signup-link {
  font-family: 'Cormorant Garamond', 'Poppins', 'Cairo', serif;
}

/* Form inputs, links, submit button, helper text in the sign-in/sign-up panels */
.panel .input,
.panel .link,
.panel button.primary,
.panel .google-btn,
.panel .google-btn span,
.panel .hr,
.panel .row,
.panel .row span {
  font-family: 'Cormorant Garamond', 'Poppins', 'Cairo', serif;
  font-optical-sizing: auto;
}

.panel .google-btn,
.panel .google-btn span {
  font-weight: 500;
  font-size: 17px;
  letter-spacing: 0.3px;
}

.panel .hr {
  font-weight: 500;
  font-size: 14px;
  letter-spacing: 2px;
}

.panel .input {
  font-size: 16px;
  letter-spacing: 0.2px;
}

.panel .link {
  font-weight: 500;
  font-size: 15px;
  letter-spacing: 0.2px;
}

.panel button.primary {
  font-weight: 600;
  font-size: 18px;
  letter-spacing: 0.5px;
}

.panel .row,
.panel .row span {
  font-size: 15px;
  font-style: italic;
}
/* Keep the "Create one" / "Log in" link upright, not italic */
.panel .row .link {
  font-style: normal;
}
