/* Developer credit, license & legal policy modals */

.footer-developer-credit {
  margin: 0.65rem 0 0;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.75);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-developer-credit i {
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.8rem;
}

.footer-developer-credit a {
  color: rgba(255, 255, 255, 0.95);
  text-decoration: none;
  font-weight: 600;
}

.footer-developer-credit a:hover {
  text-decoration: underline;
}

/* ── Triggers ─────────────────────────────────────────────── */
.docapp-license-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  cursor: pointer;
  color: inherit;
  padding: 0;
  line-height: 1;
  transition: opacity 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.docapp-license-trigger:hover {
  opacity: 0.9;
  transform: scale(1.06);
}

.docapp-license-trigger--admin {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1.5px solid var(--border-color, #dfe8e1);
  background: var(--surface-muted, #f4f7f5);
  color: var(--primary-color, #2bb906);
  font-size: 1.1rem;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

[data-theme="dark"] .docapp-license-trigger--admin {
  background: var(--surface-muted, #1a241e);
  border-color: var(--border-color, #2a3830);
}

.docapp-license-trigger--patient,
.docapp-license-trigger--lab {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  font-size: 1.05rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.docapp-license-trigger--corner {
  position: fixed;
  bottom: 1rem;
  right: 1rem;
  z-index: 100;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.96);
  color: var(--primary-color, #2bb906);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(0, 0, 0, 0.06);
}

[data-theme="dark"] .docapp-license-trigger--corner {
  background: var(--surface-elevated, #1c2820);
  border-color: var(--border-color, #2a3830);
}

.docapp-license-trigger--footer {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  color: #fff;
  font-size: 1.1rem;
}

/* ── Legal link chips ─────────────────────────────────────── */
.docapp-legal-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  justify-content: center;
  margin-top: 0.85rem;
}

.docapp-legal-chips--footer {
  margin-top: 0.5rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  width: 100%;
  max-width: 720px;
}

.docapp-legal-chips--compact {
  margin-top: 0.5rem;
  gap: 0.35rem;
}

.docapp-legal-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.38rem 0.7rem;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: rgba(255, 255, 255, 0.85);
  color: #2d3b32;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.docapp-legal-chips--footer .docapp-legal-chip {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.35);
  color: #fff;
  font-size: 0.78rem;
  padding: 0.45rem 0.85rem;
}

.docapp-legal-chip i {
  font-size: 0.78rem;
  color: var(--primary-color, #2bb906);
}

.docapp-legal-chips--footer .docapp-legal-chip i {
  color: rgba(255, 255, 255, 0.85);
}

.docapp-legal-chip:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .docapp-legal-chip {
  background: var(--surface-muted, #1a241e);
  border-color: var(--border-color, #2a3830);
  color: var(--text-dark, #e8f0ea);
}

/* ── Modals (shared) ──────────────────────────────────────── */
.docapp-legal-modal[hidden] {
  display: none !important;
}

.docapp-legal-modal {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.docapp-legal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 14, 11, 0.58);
  backdrop-filter: blur(5px);
}

.docapp-legal-dialog {
  position: relative;
  width: 100%;
  max-width: 440px;
  max-height: 90vh;
  overflow: auto;
  background: #fff;
  border-radius: 18px;
  padding: 1.35rem 1.25rem 1.15rem;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.22);
  animation: docappLegalIn 0.28s ease;
}

.docapp-legal-dialog--policy {
  max-width: 520px;
}

[data-theme="dark"] .docapp-legal-dialog {
  background: #1c2820;
  color: #e8f0ea;
  border: 1px solid #2a3830;
}

@keyframes docappLegalIn {
  from { opacity: 0; transform: translateY(14px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.docapp-legal-close {
  position: absolute;
  top: 0.8rem;
  right: 0.8rem;
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.06);
  color: inherit;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

[data-theme="dark"] .docapp-legal-close {
  background: rgba(255, 255, 255, 0.08);
}

.docapp-legal-dialog-head {
  text-align: center;
  margin-bottom: 1rem;
  padding-top: 0.25rem;
}

.docapp-legal-dialog-head--license {
  padding-bottom: 0.25rem;
  border-bottom: 1px solid #e8eeea;
  margin-bottom: 1rem;
}

[data-theme="dark"] .docapp-legal-dialog-head--license {
  border-bottom-color: #2a3830;
}

.docapp-legal-head-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 0.65rem;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.45rem;
  color: #fff;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.docapp-legal-head-icon--terms {
  background: linear-gradient(135deg, #1565c0, #42a5f5);
}

.docapp-legal-head-icon--privacy {
  background: linear-gradient(135deg, #6a1b9a, #ab47bc);
}

.docapp-legal-head-icon--refund {
  background: linear-gradient(135deg, #e65100, #ff9800);
}

.docapp-legal-head-icon--license {
  background: var(--primary-gradient, linear-gradient(135deg, #1a5a02, #2bb906));
}

.docapp-legal-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin: 0;
  line-height: 1.3;
}

.docapp-legal-subtitle {
  margin: 0.3rem 0 0;
  font-size: 0.82rem;
  color: #6b7c72;
}

[data-theme="dark"] .docapp-legal-subtitle {
  color: #9eb0a4;
}

/* ── License info cards ───────────────────────────────────── */
.docapp-legal-body {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.docapp-info-card {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
  padding: 0.85rem;
  border-radius: 12px;
  background: linear-gradient(135deg, #f8fbf9 0%, #f2f7f4 100%);
  border: 1px solid #e4ede8;
  transition: box-shadow 0.2s ease;
}

.docapp-info-card:hover {
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] .docapp-info-card {
  background: linear-gradient(135deg, #161f19 0%, #1a241e 100%);
  border-color: #2a3830;
}

.docapp-info-card-icon {
  width: 42px;
  height: 42px;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1rem;
  flex-shrink: 0;
}

.docapp-info-card-icon--license { background: linear-gradient(135deg, #2e7d32, #66bb6a); }
.docapp-info-card-icon--dev     { background: linear-gradient(135deg, #1565c0, #42a5f5); }
.docapp-info-card-icon--company { background: linear-gradient(135deg, #6a1b9a, #ab47bc); }

.docapp-info-card-content {
  flex: 1;
  min-width: 0;
}

.docapp-info-card-label {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--primary-color, #2bb906);
  margin-bottom: 0.3rem;
}

.docapp-info-card-label i {
  font-size: 0.72rem;
  opacity: 0.85;
}

.docapp-info-card-value {
  display: block;
  font-size: 0.95rem;
  font-weight: 600;
  margin: 0;
  line-height: 1.45;
  color: #14231a;
}

[data-theme="dark"] .docapp-info-card-value {
  color: #e8f0ea;
}

.docapp-info-card-meta {
  margin: 0.28rem 0 0;
  font-size: 0.84rem;
  color: #5c6b62;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

[data-theme="dark"] .docapp-info-card-meta {
  color: #9eb0a4;
}

.docapp-info-card-meta i {
  width: 14px;
  text-align: center;
  color: var(--primary-color, #2bb906);
  font-size: 0.8rem;
}

.docapp-info-card-meta a {
  color: var(--primary-color, #2bb906);
  text-decoration: none;
  font-weight: 600;
}

.docapp-info-card-meta a:hover {
  text-decoration: underline;
}

/* ── Policy modal body ────────────────────────────────────── */
.docapp-legal-policy-body {
  font-size: 0.86rem;
  line-height: 1.65;
  color: #3d4a42;
  max-height: 55vh;
  overflow-y: auto;
  padding: 0.25rem 0.15rem 0.5rem;
}

[data-theme="dark"] .docapp-legal-policy-body {
  color: #c5d4cb;
}

.docapp-legal-policy-body::-webkit-scrollbar {
  width: 6px;
}

.docapp-legal-policy-body::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.15);
  border-radius: 3px;
}

/* ── Login / patient credits ──────────────────────────────── */
.patient-login .pl-developer-credit,
.login-developer-credit {
  text-align: center;
  margin-top: 1rem;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.login-developer-credit {
  color: rgba(0, 0, 0, 0.45);
}

[data-theme="dark"] .login-developer-credit {
  color: rgba(255, 255, 255, 0.5);
}

.patient-login .pl-developer-credit a,
.login-developer-credit a {
  color: var(--primary-color, #2bb906);
  font-weight: 600;
  text-decoration: none;
}

.patient-login .pl-developer-credit a {
  color: #fff;
}

.patient-login .pl-developer-credit a:hover,
.login-developer-credit a:hover {
  text-decoration: underline;
}

.admin-legal-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  justify-content: center;
  margin-top: 0.35rem;
}

.admin-legal-bar .docapp-legal-chip {
  font-size: 0.68rem;
  padding: 0.3rem 0.55rem;
}
