/* ============================================================
   auth.css — Auth modal, sidebar user card, feedback widget
   ============================================================ */

/* ── Auth modal ─────────────────────────────────────────── */
.auth-modal-overlay {
  position: fixed; inset: 0;
  background: rgba(15, 23, 42, .75);
  backdrop-filter: blur(6px);
  display: grid; place-items: center;
  z-index: 9999;
  padding: 20px;
  animation: fadeIn .2s ease-out;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

.auth-modal-card {
  background: var(--surface, #fff);
  color: var(--text, #0F172A);
  border-radius: 20px;
  padding: 36px 32px 28px;
  width: 100%; max-width: 420px;
  position: relative;
  box-shadow: 0 25px 60px rgba(0,0,0,.4);
  animation: slideUp .25s ease-out;
}
[data-theme="dark"] .auth-modal-card { background: #1E293B; color: #F8FAFC; }

.auth-modal-close {
  position: absolute; top: 14px; right: 14px;
  width: 36px; height: 36px;
  border: 0; background: transparent;
  font-size: 1.5rem; cursor: pointer;
  border-radius: 8px;
  color: inherit;
  transition: background .2s;
}
.auth-modal-close:hover { background: rgba(0,0,0,.08); }
[data-theme="dark"] .auth-modal-close:hover { background: rgba(255,255,255,.1); }

.auth-modal-head { text-align: center; margin-bottom: 24px; }
.auth-modal-icon { font-size: 2.4rem; margin-bottom: 8px; }
.auth-modal-head h2 { font-size: 1.5rem; font-weight: 800; margin-bottom: 6px; }
.auth-modal-head p { color: var(--text2, #64748B); font-size: .92rem; }

.auth-form { display: flex; flex-direction: column; gap: 14px; }
.auth-form label { display: flex; flex-direction: column; gap: 6px; font-size: .9rem; font-weight: 600; }
.auth-form label small { color: var(--text2, #94A3B8); font-weight: 400; }
.auth-form input {
  padding: 12px 14px; font-size: 1rem;
  border: 1.5px solid var(--border, #E2E8F0);
  border-radius: 10px;
  background: var(--surface2, #F8FAFC);
  color: inherit; font-family: inherit;
  transition: border-color .2s;
}
[data-theme="dark"] .auth-form input { background: #0F172A; border-color: #334155; }
.auth-form input:focus { outline: none; border-color: var(--accent, #2563EB); }

.auth-error {
  background: rgba(239, 68, 68, .1);
  color: #DC2626;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: .9rem;
  border-left: 3px solid #DC2626;
}

.auth-submit { width: 100%; justify-content: center; padding: 14px; font-size: 1rem; margin-top: 4px; }
.auth-submit:disabled { opacity: .6; cursor: not-allowed; }

.auth-modal-foot {
  text-align: center; margin-top: 18px; padding-top: 18px;
  border-top: 1px solid var(--border, #E2E8F0);
  font-size: .9rem; color: var(--text2, #64748B);
}
.auth-modal-foot a { color: var(--accent, #2563EB); font-weight: 700; cursor: pointer; }
.auth-modal-foot a:hover { text-decoration: underline; }

/* ── Sidebar user card / CTA ───────────────────────────── */
#auth-ui { padding: 14px; border-top: 1px solid var(--border, #E2E8F0); }

.auth-user-card {
  display: flex; align-items: center; gap: 10px;
  padding: 10px; border-radius: 12px;
  background: var(--surface2, #F8FAFC);
}
[data-theme="dark"] .auth-user-card { background: rgba(255,255,255,.05); }

.auth-user-avatar {
  width: 36px; height: 36px; flex-shrink: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, #F59E0B, #EF4444);
  color: #fff;
  display: grid; place-items: center;
  font-weight: 800;
}
.auth-user-info { flex: 1; min-width: 0; }
.auth-user-name { font-weight: 700; font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.auth-user-plan { font-size: .75rem; color: var(--text2, #64748B); }
.auth-user-logout {
  width: 32px; height: 32px;
  border: 0; background: transparent;
  border-radius: 8px; cursor: pointer;
  font-size: 1.1rem; color: var(--text2, #64748B);
  transition: all .2s;
}
.auth-user-logout:hover { background: rgba(239, 68, 68, .1); color: #DC2626; }

.auth-cta-card { display: flex; flex-direction: column; gap: 8px; }
.auth-cta-card .btn { width: 100%; justify-content: center; }
.btn-link {
  background: transparent; border: 0; cursor: pointer;
  color: var(--accent, #2563EB); font-size: .85rem;
  padding: 6px; font-family: inherit;
  text-decoration: underline;
}

/* ── Feedback FAB ──────────────────────────────────────── */
.feedback-fab {
  position: fixed; bottom: 24px; right: 24px;
  width: 56px; height: 56px;
  border-radius: 50%; border: 0;
  background: linear-gradient(135deg, #F59E0B, #EF4444);
  color: #fff; font-size: 1.4rem;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(245, 158, 11, .5);
  z-index: 999;
  transition: transform .2s;
}
.feedback-fab:hover { transform: scale(1.1) rotate(-8deg); }

/* ── Feedback modal ────────────────────────────────────── */
.feedback-overlay {
  position: fixed; inset: 0;
  background: rgba(15, 23, 42, .75);
  backdrop-filter: blur(6px);
  display: grid; place-items: center;
  z-index: 9999; padding: 20px;
  animation: fadeIn .2s ease-out;
}
.feedback-card {
  background: var(--surface, #fff);
  color: var(--text, #0F172A);
  border-radius: 20px;
  padding: 32px 28px 24px;
  width: 100%; max-width: 460px;
  position: relative;
  box-shadow: 0 25px 60px rgba(0,0,0,.4);
  animation: slideUp .25s ease-out;
  max-height: 90vh; overflow-y: auto;
}
[data-theme="dark"] .feedback-card { background: #1E293B; color: #F8FAFC; }

.feedback-close {
  position: absolute; top: 14px; right: 14px;
  width: 36px; height: 36px;
  border: 0; background: transparent;
  font-size: 1.5rem; cursor: pointer;
  border-radius: 8px; color: inherit;
}
.feedback-close:hover { background: rgba(0,0,0,.08); }

.feedback-card h3 { font-size: 1.4rem; font-weight: 800; margin-bottom: 6px; }
.feedback-sub { color: var(--text2, #64748B); font-size: .9rem; margin-bottom: 20px; }

.feedback-form { display: flex; flex-direction: column; gap: 14px; }
.feedback-form > label { display: flex; flex-direction: column; gap: 8px; font-size: .9rem; font-weight: 600; }
.feedback-form input,
.feedback-form textarea {
  padding: 10px 12px; font-size: .95rem;
  border: 1.5px solid var(--border, #E2E8F0);
  border-radius: 10px;
  background: var(--surface2, #F8FAFC);
  color: inherit; font-family: inherit;
  resize: vertical;
}
[data-theme="dark"] .feedback-form input,
[data-theme="dark"] .feedback-form textarea { background: #0F172A; border-color: #334155; }
.feedback-form input:focus,
.feedback-form textarea:focus { outline: none; border-color: var(--accent, #2563EB); }

.feedback-types { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.feedback-types label {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 10px; border-radius: 8px;
  background: var(--surface2, #F8FAFC);
  cursor: pointer;
  font-size: .85rem; font-weight: 500;
  border: 1.5px solid transparent;
  transition: border-color .2s;
}
.feedback-types label:has(input:checked) {
  border-color: var(--accent, #2563EB);
  background: rgba(37, 99, 235, .08);
}
.feedback-types input[type="radio"] { accent-color: var(--accent, #2563EB); }
[data-theme="dark"] .feedback-types label { background: rgba(255,255,255,.05); }

.feedback-stars { display: flex; gap: 4px; cursor: pointer; }
.feedback-star {
  font-size: 1.6rem;
  color: #F59E0B;
  user-select: none;
  transition: transform .15s;
}
.feedback-star:hover { transform: scale(1.2); }

.feedback-error {
  background: rgba(239, 68, 68, .1);
  color: #DC2626;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: .9rem;
}

.feedback-submit { width: 100%; justify-content: center; padding: 14px; }
.feedback-submit:disabled { opacity: .6; cursor: not-allowed; }

.feedback-success {
  text-align: center; padding: 24px 8px;
}
.feedback-success-icon {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, #10B981, #059669);
  color: #fff;
  display: grid; place-items: center;
  font-size: 2rem;
  margin: 0 auto 16px;
  animation: scaleIn .4s cubic-bezier(.34,1.56,.64,1);
}
@keyframes scaleIn { from { transform: scale(0); } to { transform: scale(1); } }
.feedback-success h3 { margin-bottom: 8px; }
.feedback-success p { color: var(--text2, #64748B); margin-bottom: 20px; }

/* Mobile tweaks */
@media (max-width: 480px) {
  .feedback-fab { width: 48px; height: 48px; bottom: 16px; right: 16px; font-size: 1.2rem; }
  .auth-modal-card, .feedback-card { padding: 28px 20px 20px; }
  .feedback-types { grid-template-columns: 1fr; }
}
