/**
 * Bayaa Authentication & Registration Styles
 * Luxury Desktop Split-Layout (Form Right / Brand Logo Showcase Left in RTL)
 * Brand Palette: Deep Navy #0F2A4A, Vivid Orange #FF6B00, Crisp White #FFFFFF
 * Typography: Cairo
 */

.bayaa-auth-container {
  direction: rtl;
  text-align: right;
  font-family: 'Cairo', system-ui, -apple-system, sans-serif !important;
  width: 100%;
  max-width: 1060px;
  margin: 24px auto;
  align-self: center;
  padding: 0 18px;
  box-sizing: border-box;
}

.bayaa-auth-container *,
.bayaa-auth-container *::before,
.bayaa-auth-container *::after {
  box-sizing: border-box;
  font-family: 'Cairo', system-ui, -apple-system, sans-serif;
}

/* Desktop Split Card */
.bayaa-auth-split-card {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 24px 60px -12px rgba(15, 42, 74, 0.14);
}

/* Right Pane (Form) */
.bayaa-auth-form-pane {
  padding: 36px 40px;
  background: #ffffff;
}

/* Left Pane (Brand & Site Logo Showcase - Desktop Only) */
.bayaa-auth-brand-pane {
  position: relative;
  background: linear-gradient(155deg, #0F2A4A 0%, #163b66 65%, #0b203a 100%);
  color: #ffffff;
  padding: 42px 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.bayaa-auth-brand-pane::before {
  content: '';
  position: absolute;
  top: -70px;
  left: -70px;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 107, 0, 0.25) 0%, rgba(255, 107, 0, 0) 70%);
  pointer-events: none;
}

.bayaa-auth-brand-pane::after {
  content: '';
  position: absolute;
  bottom: -80px;
  right: -60px;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0) 70%);
  pointer-events: none;
}

.bayaa-auth-brand-inner {
  position: relative;
  z-index: 2;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: right;
}

.bayaa-auth-brand-logo-card {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  padding: 16px 26px;
  border-radius: 16px;
  margin-bottom: 26px;
  text-decoration: none;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.22);
  border: 2px solid rgba(255, 107, 0, 0.25);
  max-width: 100%;
  transition: transform 0.2s ease;
}

.bayaa-auth-brand-logo-card:hover {
  transform: translateY(-2px);
}

.bayaa-auth-desktop-logo-img {
  max-height: 64px;
  max-width: 220px;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}

.bayaa-auth-desktop-wordmark,
.bayaa-auth-wordmark {
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.2;
}

.bayaa-auth-desktop-wordmark strong,
.bayaa-auth-wordmark strong {
  font-size: 26px;
  font-weight: 900;
  color: #0F2A4A;
}

.bayaa-auth-desktop-wordmark small,
.bayaa-auth-wordmark small {
  font-size: 11px;
  font-weight: 800;
  color: #FF6B00;
}

.bayaa-auth-brand-title {
  margin: 0 0 10px;
  font-size: 22px;
  font-weight: 900;
  color: #ffffff;
  line-height: 1.4;
}

.bayaa-auth-brand-desc {
  margin: 0 0 24px;
  font-size: 13.5px;
  line-height: 1.75;
  color: #cbd5e1;
  font-weight: 500;
}

.bayaa-auth-brand-features {
  list-style: none;
  margin: 0 0 28px;
  padding: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.bayaa-auth-brand-features li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 700;
  color: #f8fafc;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 10px 14px;
  border-radius: 12px;
}

.bayaa-feat-icon {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: #FF6B00;
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.bayaa-auth-brand-footer {
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  width: 100%;
  font-size: 12px;
  font-weight: 600;
  color: #94a3b8;
}

/* Mobile Compact Brand Bar (Visible only on <= 899px) */
.bayaa-auth-mobile-brand {
  display: none;
  text-align: center;
  margin-bottom: 16px;
}

.bayaa-auth-mobile-logo-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.bayaa-auth-mobile-logo-img {
  max-height: 48px;
  max-width: 170px;
  width: auto;
  object-fit: contain;
}

/* Header Branding inside Form Pane */
.bayaa-auth-header {
  text-align: right;
  margin-bottom: 20px;
}

.bayaa-auth-logo-badge {
  display: inline-block;
  background: #fff7ed;
  color: #FF6B00;
  border: 1px solid #fed7aa;
  font-size: 11px;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 8px;
}

.bayaa-auth-header h2 {
  font-size: 24px;
  font-weight: 900;
  color: #0F2A4A;
  margin: 0 0 4px;
}

.bayaa-auth-subtitle {
  margin: 0;
  font-size: 13.5px;
  color: #64748b;
  font-weight: 500;
}

/* Notices & Alerts */
.bayaa-auth-notice {
  padding: 12px 15px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.55;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.bayaa-notice-warning {
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #b45309;
}

.bayaa-notice-info {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  color: #c2410c;
}

.bayaa-auth-alert {
  padding: 12px 15px;
  border-radius: 11px;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  animation: bayaaFadeIn 0.25s ease;
}

.bayaa-alert-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #dc2626;
}

.bayaa-alert-success {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #16a34a;
}

/* Main Tabs */
.bayaa-auth-tabs {
  display: flex;
  background: #f1f5f9;
  padding: 5px;
  border-radius: 14px;
  margin-bottom: 22px;
  gap: 6px;
}

.bayaa-auth-tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 14px;
  border: none;
  background: transparent;
  color: #64748b;
  font-size: 14px;
  font-weight: 800;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.bayaa-auth-tab:hover {
  color: #0F2A4A;
}

.bayaa-auth-tab.active {
  background: #0F2A4A;
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(15, 42, 74, 0.22);
}

/* Panels */
.bayaa-auth-panel {
  display: none;
}

.bayaa-auth-panel.active {
  display: block;
  animation: bayaaFadeIn 0.25s ease;
}

/* Role Selector Pills */
.bayaa-role-selector {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 20px;
}

.bayaa-role-pill {
  position: relative;
  cursor: pointer;
}

.bayaa-role-pill input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.bayaa-role-pill-content {
  border: 2px solid #e2e8f0;
  background: #f8fafc;
  border-radius: 13px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all 0.2s ease;
}

.bayaa-role-pill-content .role-icon {
  font-size: 22px;
}

.bayaa-role-pill-content strong {
  display: block;
  font-size: 13.5px;
  font-weight: 800;
  color: #0F2A4A;
  margin-bottom: 2px;
}

.bayaa-role-pill-content small {
  display: block;
  font-size: 11px;
  color: #64748b;
  line-height: 1.3;
}

.bayaa-role-pill.active .bayaa-role-pill-content,
.bayaa-role-pill input:checked + .bayaa-role-pill-content {
  border-color: #FF6B00;
  background: #fff7ed;
  box-shadow: 0 4px 14px rgba(255, 107, 0, 0.14);
}

.bayaa-role-pill.active .bayaa-role-pill-content strong,
.bayaa-role-pill input:checked + .bayaa-role-pill-content strong {
  color: #FF6B00;
}

/* Vendor Intro Banner */
.bayaa-vendor-intro-banner {
  background: linear-gradient(135deg, #0F2A4A, #1a4475);
  color: #ffffff;
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.55;
  margin-bottom: 18px;
  border-right: 4px solid #FF6B00;
}

/* Form Fields */
.bayaa-form-field {
  margin-bottom: 15px;
}

.bayaa-form-field label {
  display: block;
  font-size: 13px;
  font-weight: 800;
  color: #0F2A4A;
  margin-bottom: 6px;
}

.bayaa-label-with-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.bayaa-label-with-link label {
  margin-bottom: 0;
}

.bayaa-forgot-link {
  font-size: 12px;
  color: #FF6B00;
  text-decoration: none;
  font-weight: 700;
}

.bayaa-forgot-link:hover {
  text-decoration: underline;
}

.bayaa-form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.bayaa-input-icon-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.bayaa-input-icon-wrap input,
.bayaa-form-field textarea {
  width: 100%;
  padding: 11px 40px 11px 14px;
  background: #f8fafc;
  border: 1.5px solid #cbd5e1;
  border-radius: 11px;
  font-size: 13.5px;
  font-weight: 600;
  color: #0F2A4A;
  transition: all 0.2s ease;
  outline: none;
}

.bayaa-form-field textarea {
  padding: 10px 14px;
  resize: vertical;
}

.bayaa-input-icon-wrap input:focus,
.bayaa-form-field textarea:focus {
  background: #ffffff;
  border-color: #FF6B00;
  box-shadow: 0 0 0 3px rgba(255, 107, 0, 0.14);
}

.bayaa-input-icon {
  position: absolute;
  right: 13px;
  color: #94a3b8;
  pointer-events: none;
}

.bayaa-pwd-toggle {
  position: absolute;
  left: 11px;
  background: none;
  border: none;
  cursor: pointer;
  color: #94a3b8;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.bayaa-pwd-toggle:hover {
  color: #0F2A4A;
}

/* Slug & Phone Status */
.slug-status,
.phone-status {
  font-size: 11px;
  font-weight: 700;
  transition: all 0.2s ease;
}

.slug-status.available,
.phone-status.available {
  color: #16a34a;
}

.slug-status.taken,
.phone-status.taken {
  color: #dc2626;
}

.bayaa-slug-preview {
  margin-top: 6px;
  font-size: 11.5px;
  color: #64748b;
  direction: ltr;
  text-align: left;
}

.bayaa-slug-preview code {
  background: #f1f5f9;
  padding: 3px 8px;
  border-radius: 6px;
  color: #0F2A4A;
  font-weight: 700;
}

/* Checkbox Rows */
.bayaa-reg-cats-wrap {
  margin-bottom: 16px;
}

.bayaa-reg-cats-hint {
  margin: 0 0 10px 0;
  font-size: 12px;
  color: #64748b;
  line-height: 1.5;
}

.bayaa-reg-cats-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-height: 185px;
  overflow-y: auto;
  padding: 10px;
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
}

.bayaa-reg-cat-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 700;
  color: #0F2A4A;
  cursor: pointer;
  transition: all 0.18s ease;
  user-select: none;
}

.bayaa-reg-cat-pill:hover {
  border-color: #FF6B00;
}

.bayaa-reg-cat-pill input[type="checkbox"] {
  width: 15px;
  height: 15px;
  margin: 0;
  accent-color: #FF6B00;
  cursor: pointer;
}

.bayaa-reg-cat-pill:has(input:checked) {
  background: #fff7ed;
  border-color: #FF6B00;
  color: #FF6B00;
}

.bayaa-remember-row,
.bayaa-terms-row {
  margin-bottom: 18px;
}

.bayaa-checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: #475569;
}

.bayaa-checkbox-label input[type="checkbox"] {
  width: 17px;
  height: 17px;
  accent-color: #FF6B00;
  cursor: pointer;
}

.bayaa-checkbox-label a {
  color: #FF6B00;
  text-decoration: underline;
  font-weight: 700;
}

/* Submit Buttons (Brand Navy & Vivid Orange) */
.bayaa-auth-submit-btn {
  width: 100%;
  padding: 13px 20px;
  border-radius: 12px;
  border: none;
  background: #FF6B00;
  color: #ffffff;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 6px 18px rgba(255, 107, 0, 0.28);
  transition: all 0.25s ease;
}

.bayaa-auth-submit-btn:hover {
  background: #e85f00;
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(255, 107, 0, 0.36);
}

.bayaa-btn-success {
  background: #FF6B00;
  box-shadow: 0 6px 18px rgba(255, 107, 0, 0.28);
}

.bayaa-btn-success:hover {
  background: #e85f00;
  box-shadow: 0 10px 24px rgba(255, 107, 0, 0.36);
}

.bayaa-btn-vendor {
  background: linear-gradient(135deg, #0F2A4A 0%, #194170 100%);
  box-shadow: 0 6px 18px rgba(15, 42, 74, 0.32);
}

.bayaa-btn-vendor:hover {
  background: linear-gradient(135deg, #091d36 0%, #0F2A4A 100%);
  box-shadow: 0 10px 24px rgba(15, 42, 74, 0.42);
}

.bayaa-auth-submit-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
}

/* Spinner */
.btn-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: bayaaSpin 0.8s linear infinite;
}

/* Logged-in Card */
.bayaa-auth-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  padding: 36px 32px;
  box-shadow: 0 16px 40px rgba(15, 42, 74, 0.08);
  max-width: 540px;
  margin: 0 auto;
}

.bayaa-auth-logged-in {
  text-align: center;
  padding: 40px 26px;
}

.bayaa-auth-avatar-circle img {
  border-radius: 50%;
  border: 3px solid #FF6B00;
  margin-bottom: 12px;
}

.bayaa-auth-role-badge {
  display: inline-block;
  background: #fff7ed;
  color: #FF6B00;
  border: 1px solid #fed7aa;
  font-size: 13px;
  font-weight: 800;
  padding: 4px 14px;
  border-radius: 20px;
  margin: 6px 0 16px;
}

.bayaa-auth-logged-info {
  font-size: 14px;
  color: #64748b;
  margin-bottom: 24px;
}

.bayaa-auth-actions-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.bayaa-auth-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 800;
  font-size: 14px;
  transition: all 0.2s ease;
}

.bayaa-btn-primary {
  background: #0F2A4A;
  color: #ffffff;
}

.bayaa-btn-primary:hover {
  background: #FF6B00;
}

.bayaa-btn-outline {
  border: 1px solid #cbd5e1;
  color: #64748b;
}

.bayaa-btn-outline:hover {
  background: #f1f5f9;
  color: #0F2A4A;
}

/* Mobile & Tablet Responsive Breakpoints */
@media (max-width: 899px) {
  .bayaa-auth-container {
    max-width: 540px;
    margin: 12px auto;
    padding: 0 14px;
  }

  .bayaa-auth-split-card {
    grid-template-columns: 1fr;
    border-radius: 18px;
  }

  .bayaa-auth-brand-pane {
    display: none;
  }

  .bayaa-auth-mobile-brand {
    display: block;
  }

  .bayaa-auth-form-pane {
    padding: 26px 22px;
  }

  .bayaa-auth-header {
    text-align: center;
  }

  .bayaa-auth-header h2 {
    font-size: 21px;
  }
}

@media (max-width: 540px) {
  .bayaa-form-grid-2,
  .bayaa-role-selector {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .bayaa-role-selector {
    gap: 10px;
  }

  .bayaa-auth-form-pane {
    padding: 22px 16px;
  }
}

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

@keyframes bayaaFadeIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
