/* ===== SimpleNDA – Shared Styles ===== */

/* --- Glass Panel --- */
.glass-panel {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.dark .glass-panel {
  background: rgba(16, 22, 34, 0.7);
}

/* --- Custom Scrollbar --- */
.custom-scrollbar::-webkit-scrollbar {
  width: 5px;
}
.custom-scrollbar::-webkit-scrollbar-track {
  background: transparent;
}
.custom-scrollbar::-webkit-scrollbar-thumb {
  background-color: #cbd5e1;
  border-radius: 20px;
}
.dark .custom-scrollbar::-webkit-scrollbar-thumb {
  background-color: #334155;
}

/* --- Drag & Drop active state --- */
.drag-active {
  background-color: rgba(106, 35, 206, 0.08) !important;
  border-color: #6a23ce !important;
  box-shadow: 0 0 0 3px rgba(106, 35, 206, 0.15);
}

/* --- Risk Highlights (document viewer) --- */
.highlight-high {
  background-color: rgba(239, 68, 68, 0.2);
  border-bottom: 2px solid #ef4444;
  cursor: pointer;
  position: relative;
}
.highlight-medium {
  background-color: rgba(249, 115, 22, 0.2);
  border-bottom: 2px solid #f97316;
  cursor: pointer;
  position: relative;
}
.highlight-low {
  background-color: rgba(234, 179, 8, 0.2);
  border-bottom: 2px solid #eab308;
  cursor: pointer;
  position: relative;
}

/* --- Toast notification --- */
.toast {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  background: #1e293b;
  color: #fff;
  padding: 0.75rem 1.25rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
  z-index: 9999;
  transform: translateY(120%);
  opacity: 0;
  transition:
    transform 0.35s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.toast.show {
  transform: translateY(0);
  opacity: 1;
}
.dark .toast {
  background: #e2e8f0;
  color: #0f172a;
}

/* --- Page transition --- */
body {
  opacity: 0;
  animation: fadeIn 0.3s ease forwards;
}
@keyframes fadeIn {
  to {
    opacity: 1;
  }
}

/* --- Dark mode transition --- */
body,
body * {
  transition:
    background-color 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease;
}

/* --- Mobile menu overlay --- */
.mobile-menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 40;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.mobile-menu-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

/* --- Auth Chooser Modal --- */
.auth-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.auth-modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}
.auth-modal {
  background: #fff;
  border-radius: 1rem;
  box-shadow:
    0 25px 60px rgba(0, 0, 0, 0.25),
    0 0 0 1px rgba(0, 0, 0, 0.05);
  width: 100%;
  max-width: 420px;
  margin: 1rem;
  padding: 2rem;
  transform: translateY(20px) scale(0.97);
  transition:
    transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
    opacity 0.25s ease;
  opacity: 0;
}
.auth-modal-overlay.active .auth-modal {
  transform: translateY(0) scale(1);
  opacity: 1;
}
.dark .auth-modal {
  background: #1e2532;
  box-shadow:
    0 25px 60px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(255, 255, 255, 0.05);
}
.auth-modal-header {
  text-align: center;
  margin-bottom: 1.5rem;
}
.auth-modal-header h2 {
  font-size: 1.375rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 0.375rem;
}
.dark .auth-modal-header h2 {
  color: #f1f5f9;
}
.auth-modal-header p {
  font-size: 0.875rem;
  color: #64748b;
}
.dark .auth-modal-header p {
  color: #94a3b8;
}

/* Provider buttons */
.auth-provider-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: 0.625rem;
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #1e293b;
  margin-bottom: 0.625rem;
}
.auth-provider-btn:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}
.dark .auth-provider-btn {
  background: #252d3d;
  border-color: #334155;
  color: #e2e8f0;
}
.dark .auth-provider-btn:hover {
  background: #2d3748;
  border-color: #475569;
}
.auth-provider-btn svg,
.auth-provider-btn .material-icons {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}
.auth-provider-btn .material-icons {
  font-size: 20px;
  color: #6a23ce;
}

/* Divider */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1rem 0;
  font-size: 0.75rem;
  color: #94a3b8;
  text-transform: uppercase;
  font-weight: 500;
  letter-spacing: 0.05em;
}
.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #e2e8f0;
}
.dark .auth-divider::before,
.dark .auth-divider::after {
  background: #334155;
}

/* Email form */
.auth-email-form {
  display: none;
  flex-direction: column;
  gap: 0.75rem;
}
.auth-email-form.active {
  display: flex;
}
.auth-email-input {
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: 0.625rem;
  border: 1px solid #e2e8f0;
  background: #fff;
  font-size: 0.9375rem;
  color: #1e293b;
  outline: none;
  transition: all 0.2s ease;
  box-sizing: border-box;
}
.auth-email-input:focus {
  border-color: #6a23ce;
  box-shadow: 0 0 0 3px rgba(106, 35, 206, 0.1);
}
.dark .auth-email-input {
  background: #252d3d;
  border-color: #334155;
  color: #e2e8f0;
}
.dark .auth-email-input:focus {
  border-color: #6a23ce;
  box-shadow: 0 0 0 3px rgba(106, 35, 206, 0.2);
}
.auth-send-btn {
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: 0.625rem;
  background: #6a23ce;
  color: #fff;
  font-size: 0.9375rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: background 0.2s ease;
}
.auth-send-btn:hover {
  background: #5a1db3;
}
.auth-send-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Check email confirmation */
.auth-check-email {
  display: none;
  text-align: center;
  padding: 1rem 0;
}
.auth-check-email.active {
  display: block;
}
.auth-check-email .material-icons {
  font-size: 48px;
  color: #22c55e;
  margin-bottom: 0.75rem;
}
.auth-check-email h3 {
  font-size: 1.125rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 0.375rem;
}
.dark .auth-check-email h3 {
  color: #f1f5f9;
}
.auth-check-email p {
  font-size: 0.875rem;
  color: #64748b;
  line-height: 1.5;
}
.dark .auth-check-email p {
  color: #94a3b8;
}
.auth-check-email .auth-email-sent-to {
  font-weight: 600;
  color: #0f172a;
}
.dark .auth-check-email .auth-email-sent-to {
  color: #f1f5f9;
}

/* Close button */
.auth-modal-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background: none;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  padding: 0.25rem;
  border-radius: 0.375rem;
  transition: all 0.15s ease;
}
.auth-modal-close:hover {
  background: #f1f5f9;
  color: #475569;
}
.dark .auth-modal-close:hover {
  background: #334155;
  color: #cbd5e1;
}

/* Back link in email form */
.auth-back-link {
  font-size: 0.8125rem;
  color: #6a23ce;
  cursor: pointer;
  text-align: center;
  margin-top: 0.25rem;
  background: none;
  border: none;
  font-weight: 500;
}
.auth-back-link:hover {
  text-decoration: underline;
}
