/* ===============================
   OSSI AUTH MODAL – BRAND THEME
   FIXED: pointer-events + stacking
   =============================== */

/* ===============================
   VISIBILITY
   =============================== */
.auth-modal.hidden {
  display: none;
}

/* ===============================
   MODAL ROOT (FULL SCREEN)
   =============================== */
.auth-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

/* ===============================
   BACKDROP (VISUAL ONLY)
   IMPORTANT:
   - MUST NOT capture clicks
   - Otherwise modal buttons are dead
   =============================== */
.auth-backdrop {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(255, 92, 138, 0.35),
    rgba(255, 138, 0, 0.35)
  );
  backdrop-filter: blur(6px);

  /* 🔥 CRITICAL FIX */
  pointer-events: none; /* allow clicks to pass through */
  z-index: 1;
}

/* ===============================
   MODAL BOX (INTERACTIVE LAYER)
   =============================== */
.auth-box {
  position: relative;
  max-width: 380px;
  margin: 8vh auto;
  background: #ffffff;
  border-radius: 18px;
  padding: 26px 24px 24px;

  /* 🔥 MUST BE ABOVE BACKDROP */
  z-index: 2;

  /* 🔥 MUST RECEIVE POINTER EVENTS */
  pointer-events: auto;

  box-shadow:
    0 20px 50px rgba(30, 42, 58, 0.15),
    0 4px 12px rgba(0, 0, 0, 0.05);
}

/* ===============================
   CLOSE BUTTON
   =============================== */
.auth-close {
  position: absolute;
  top: 12px;
  right: 14px;
  font-size: 22px;
  border: none;
  background: none;
  color: #8a8f98;
  cursor: pointer;
  transition: color 0.2s ease;
}

.auth-close:hover {
  color: #ff6a00;
}

/* ===============================
   INPUTS
   =============================== */
.auth-input {
  width: 100%;
  margin-top: 10px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid #e1e5ea;
  font-size: 14px;
  color: #1e2a3a;
  background: #f7f9fc;
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

.auth-input::placeholder {
  color: #9aa3ad;
}

.auth-input:focus {
  outline: none;
  border-color: #ff6a00;
  box-shadow: 0 0 0 3px rgba(255, 106, 0, 0.15);
  background: #ffffff;
}

/* ===============================
   MAIN ACTION BUTTON
   =============================== */
.auth-main-btn {
  width: 100%;
  margin-top: 16px;
  padding: 13px;
  background: linear-gradient(
    135deg,
    #ff5c8a,
    #ff8a00
  );
  color: #ffffff;
  border: none;
  border-radius: 14px;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.auth-main-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(255, 106, 0, 0.35);
}

/* ===============================
   SECONDARY BUTTONS
   =============================== */
.auth-google-btn,
.auth-phone-btn {
  width: 100%;
  padding: 11px;
  margin-top: 10px;
  border-radius: 12px;
  border: 1px solid #e1e5ea;
  background: #ffffff;
  color: #1e2a3a;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: border 0.2s ease, background 0.2s ease;
}

.auth-google-btn:hover,
.auth-phone-btn:hover {
  background: #f7f9fc;
  border-color: #ff6a00;
}

/* ===============================
   SEPARATOR
   =============================== */
.auth-sep {
  text-align: center;
  margin: 16px 0;
  font-size: 12px;
  color: #9aa3ad;
  position: relative;
}

.auth-sep::before,
.auth-sep::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 40%;
  height: 1px;
  background: #e1e5ea;
}

.auth-sep::before {
  left: 0;
}

.auth-sep::after {
  right: 0;
}

/* ===============================
   TOGGLE TEXT
   =============================== */
.auth-toggle {
  margin-top: 14px;
  text-align: center;
  font-size: 13px;
  color: #5f6b78;
}

.auth-toggle span {
  color: #ff6a00;
  font-weight: 600;
  cursor: pointer;
}

.auth-toggle span:hover {
  text-decoration: underline;
}

/* ===============================
   LEGAL / CHECKS
   =============================== */
.auth-checks {
  margin-top: 12px;
  font-size: 12px;
  color: #7b8794;
  text-align: center;
}

/* ===============================
   UTILITY
   =============================== */
.hidden {
  display: none;
}

@media (max-width: 991.98px) {
  .auth-box {
    width: 92%;
    max-width: 380px;
    margin: 4vh auto;
    padding: 20px 18px 20px;
    max-height: min(92dvh, 700px);
    overflow-y: auto;
  }

  .auth-title {
    font-size: 1.25rem;
  }

  .auth-main-btn,
  .auth-google-btn,
  .auth-phone-btn {
    min-height: 48px;
  }
}

/* ===============================
   PRODUCT: Yorum / Soru popup
   Rendered on body → needs own tokens so pPrimaryBtn/pGhostBtn match ürün sayfası.
   =============================== */
.auth-modal.auth-modal--feedback {
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-modal.auth-modal--feedback .auth-backdrop {
  background: rgba(17, 24, 39, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  pointer-events: auto;
}

.auth-modal.auth-modal--feedback .auth-box {
  position: relative;
  max-width: min(520px, 92vw);
  width: 100%;
  margin: auto;
  padding: 1.75rem 1.5rem 1.5rem;
  background: #ffffff;
  color: var(--ft-text, #111827);
  border: 1px solid var(--ft-border, #e5e7eb);
  border-radius: var(--radius-xl, 20px);
  box-shadow:
    0 24px 56px rgba(17, 24, 39, 0.18),
    0 10px 20px rgba(17, 24, 39, 0.08);
  z-index: 2;
  pointer-events: auto;

  --primary: var(--ft-primary, #d6218c);
  --primary-dark: var(--ft-primary-dark, #b01870);
  --text-primary: var(--ft-text, #111827);
  --text-secondary: var(--ft-text-muted, #6b7280);
  --surface: #ffffff;
  --border: var(--ft-border, #e5e7eb);
  --background: #f3f4f6;
}

.auth-modal.auth-modal--feedback .feedback-modal__title {
  margin: 0 0 8px;
  font-size: 1.125rem;
  font-weight: 800;
  color: var(--ft-text, #111827);
}

.auth-modal.auth-modal--feedback .feedback-modal__muted {
  margin: 0 0 14px;
  font-size: 0.9375rem;
  color: var(--ft-text-secondary, #4b5563);
  opacity: 1;
}

.auth-modal.auth-modal--feedback .feedback-modal__stars {
  display: flex;
  gap: 6px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.auth-modal.auth-modal--feedback .feedback-modal__star {
  font-size: 1.625rem;
  line-height: 1;
  padding: 4px;
  border: none;
  background: none;
  cursor: pointer;
  color: #d1d5db;
  transition: color 0.15s ease, transform 0.15s ease;
}

.auth-modal.auth-modal--feedback .feedback-modal__star:hover {
  color: #fcd34d;
  transform: scale(1.08);
}

.auth-modal.auth-modal--feedback .feedback-modal__star--active {
  color: #f59e0b;
}

.auth-modal.auth-modal--feedback .feedback-modal__label {
  margin: 0 0 8px;
  font-weight: 700;
  font-size: 0.875rem;
  color: var(--ft-text, #111827);
}

.auth-modal.auth-modal--feedback .feedback-modal__textarea {
  width: 100%;
  min-height: 120px;
  padding: 12px 14px;
  box-sizing: border-box;
  border: 1px solid var(--ft-border, #e5e7eb);
  border-radius: var(--radius-md, 12px);
  font-family: inherit;
  font-size: 0.9375rem;
  line-height: 1.45;
  color: var(--ft-text, #111827);
  background: #f9fafb;
  resize: vertical;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.auth-modal.auth-modal--feedback .feedback-modal__textarea::placeholder {
  color: var(--ft-text-muted, #9ca3af);
}

.auth-modal.auth-modal--feedback .feedback-modal__textarea:focus {
  outline: none;
  border-color: var(--ft-primary, #d6218c);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(214, 33, 140, 0.12);
}

.auth-modal.auth-modal--feedback .feedback-modal__terms {
  margin-top: 16px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.auth-modal.auth-modal--feedback .feedback-modal__terms input {
  margin-top: 4px;
  accent-color: var(--ft-primary, #d6218c);
}

.auth-modal.auth-modal--feedback .feedback-modal__terms label {
  font-size: 0.8125rem;
  color: var(--ft-text-secondary, #4b5563);
  line-height: 1.4;
}

.auth-modal.auth-modal--feedback .feedback-modal__terms a {
  color: var(--ft-primary, #d6218c);
  font-weight: 600;
}

.auth-modal.auth-modal--feedback .feedback-modal__terms a:hover {
  text-decoration: underline;
}

.auth-modal.auth-modal--feedback .feedback-modal__actions {
  margin-top: 20px;
  display: flex;
  gap: 10px;
}

.auth-modal.auth-modal--feedback .feedback-modal__actions .pGhostBtn,
.auth-modal.auth-modal--feedback .feedback-modal__actions .pPrimaryBtn {
  flex: 1;
  margin-top: 0;
}

.auth-modal.auth-modal--feedback .pPrimaryBtn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  filter: grayscale(0.15);
}

@media (max-width: 991.98px) {
  .auth-modal.auth-modal--feedback .auth-box {
    width: min(520px, 92vw);
    margin: env(safe-area-inset-top, 0) auto env(safe-area-inset-bottom, 0);
    padding: 1.375rem 1.125rem 1.25rem;
    max-height: min(90dvh, 720px);
    overflow-y: auto;
  }
}
