/* PrePilot System Beta Badge and Feedback Popup Styles */
:root {
  --beta-coral: #FF6A2C;
  --beta-fg: #1a1a2e;
  --beta-muted: #4b5563;
  --beta-border: rgba(229, 231, 235, 0.9);
}

/* Floating Beta Badge Container */
.beta-badge-container {
  position: fixed;
  inset-block-end: 20px;
  inset-inline-start: 20px;
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.3s cubic-bezier(.16, 1, .3, 1);
}

/* 1:1 Circular Beta Badge */
.beta-badge {
  position: relative;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.9);
  border: 1.5px solid rgba(255, 106, 44, 0.22);
  border-radius: 50%;
  box-shadow: 0 10px 25px -5px rgba(255, 106, 44, 0.15);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  cursor: pointer;
  user-select: none;
  transition: transform .25s cubic-bezier(.16, 1, .3, 1), box-shadow .25s cubic-bezier(.16, 1, .3, 1), border-color .25s ease;
  padding: 0 !important;
}

html[dir="rtl"] .beta-badge {
  font-family: 'Noto Naskh Arabic', 'Outfit', sans-serif;
}

/* Hover effects */
.beta-badge-container:hover {
  transform: translateY(-2px);
}

.beta-badge-container:hover .beta-badge {
  border-color: rgba(255, 106, 44, 0.55);
  box-shadow: 0 14px 30px -4px rgba(255, 106, 44, 0.26);
}

.beta-badge:active {
  transform: scale(0.95);
}

/* SVG Inside Badge */
.beta-logo-icon {
  width: 24px;
  height: 24px;
  display: block;
}

/* Tiny Beta indicator 'β' in top-right corner of the circular badge */
.beta-indicator {
  position: absolute;
  inset-block-start: -2px;
  inset-inline-end: -2px;
  width: 15px;
  height: 15px;
  background: var(--beta-coral);
  color: #fff;
  border-radius: 50%;
  font-family: 'Outfit', sans-serif;
  font-size: 9px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(255, 106, 44, 0.4);
}

/* Close button on the edge of the container */
.beta-badge-close {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(26, 26, 46, 0.08);
  color: #9ca3af;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  line-height: 1;
  transition: all 0.2s ease;
  opacity: 0;
  transform: scale(0.8);
}

/* Only show close button on container hover to keep it extremely clean! */
.beta-badge-container:hover .beta-badge-close {
  opacity: 1;
  transform: scale(1);
}

.beta-badge-close:hover {
  background: rgba(26, 26, 46, 0.15);
  color: var(--beta-fg);
}

/* Fullscreen Blurred Modal Overlay */
.beta-overlay {
  position: fixed;
  inset: 0;
  background: rgba(26, 26, 46, 0.42);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .35s cubic-bezier(.16, 1, .3, 1);
}

.beta-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

/* Modal Content Card */
.beta-modal {
  background: #ffffff;
  border: 1px solid var(--beta-border);
  border-radius: 28px;
  width: 100%;
  max-width: 480px;
  padding: 42px;
  box-shadow: 0 16px 40px -10px rgba(26, 26, 46, 0.08);
  position: relative;
  text-align: center;
  transform: scale(0.92) translateY(12px);
  transition: transform .35s cubic-bezier(.16, 1, .3, 1);
  font-family: 'Inter', sans-serif;
}

html[dir="rtl"] .beta-modal {
  font-family: 'Noto Naskh Arabic', 'Inter', sans-serif;
  text-align: center;
}

.beta-overlay.active .beta-modal {
  transform: scale(1) translateY(0);
}

/* Stylized Logo/Icon */
.beta-modal-icon {
  width: 52px;
  height: 52px;
  background: rgba(255, 106, 44, 0.08);
  color: var(--beta-coral);
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 800;
  font-family: 'Outfit', sans-serif;
  margin-block-end: 20px;
}

/* Header Title */
.beta-modal-title {
  font-family: 'Outfit', sans-serif;
  font-size: 26px;
  font-weight: 700;
  color: var(--beta-fg);
  margin-block-end: 14px;
  letter-spacing: -0.018em;
  line-height: 1.2;
}

html[dir="rtl"] .beta-modal-title {
  font-family: 'Noto Naskh Arabic', 'Outfit', sans-serif;
}

/* Description Text */
.beta-modal-desc {
  font-size: 15px;
  line-height: 1.65;
  color: var(--beta-muted);
  margin-block-end: 32px;
}

/* Feedback Email Layout */
.beta-email-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-block-end: 36px;
}

.beta-email-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: #9ca3af;
  letter-spacing: 0.06em;
}

.beta-email-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 106, 44, 0.04);
  border: 1px dashed rgba(255, 106, 44, 0.28);
  color: var(--beta-coral);
  font-family: 'Outfit', sans-serif;
  font-size: 16px;
  font-weight: 600;
  padding: 12px 24px;
  border-radius: 999px;
  transition: all .2s cubic-bezier(.16, 1, .3, 1);
  cursor: pointer;
  text-decoration: none;
}

.beta-email-pill:hover {
  background: rgba(255, 106, 44, 0.08);
  border-color: rgba(255, 106, 44, 0.55);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px -4px rgba(255, 106, 44, 0.12);
}

.beta-email-pill:active {
  transform: translateY(0);
}

.beta-email-icon {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 2.2;
  fill: none;
}

/* Close Actions */
.beta-modal-close {
  position: absolute;
  inset-block-start: 22px;
  inset-inline-end: 22px;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #9ca3af;
  border-radius: 50%;
  background: none;
  border: none;
  cursor: pointer;
  transition: all .2s ease;
}

.beta-modal-close:hover {
  background: #f3f4f6;
  color: var(--beta-fg);
  transform: rotate(90deg);
}

.beta-btn-coral {
  display: inline-flex;
  width: 100%;
  justify-content: center;
  align-items: center;
  background: var(--beta-coral);
  color: #ffffff;
  border-radius: 16px;
  font-family: 'Outfit', sans-serif;
  font-size: 14.5px;
  font-weight: 600;
  padding: 14px 28px;
  border: none;
  cursor: pointer;
  box-shadow: 0 10px 24px -6px rgba(255, 106, 44, 0.28);
  transition: transform .2s cubic-bezier(.16, 1, .3, 1), box-shadow .2s cubic-bezier(.16, 1, .3, 1);
}

html[dir="rtl"] .beta-btn-coral {
  font-family: 'Noto Naskh Arabic', 'Outfit', sans-serif;
}

.beta-btn-coral:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px -6px rgba(255, 106, 44, 0.38);
}

.beta-btn-coral:active {
  transform: translateY(0);
}

@media (max-width: 576px) {
  .beta-badge-container {
    inset-block-end: 16px !important;
    inset-inline-start: 16px !important;
  }
  .beta-badge {
    width: 38px !important;
    height: 38px !important;
  }
  .beta-logo-icon {
    width: 20px !important;
    height: 20px !important;
  }
  .beta-badge-close {
    opacity: 1 !important;
    transform: scale(1) !important;
  }
  .beta-modal {
    padding: 32px 24px;
    border-radius: 24px;
  }
  .beta-modal-title {
    font-size: 22px;
  }
  .beta-modal-desc {
    font-size: 14px;
  }
}
