/* npass.io — Cookie Consent UI styles
 * Loaded on every public page; applies to .np-consent-* elements injected by consent.js.
 */

.np-consent-banner {
  position: fixed;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 2rem);
  max-width: 960px;
  background: #ffffff;
  color: #1f2937;
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.18);
  z-index: 9999;
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  font-size: 0.92rem;
  line-height: 1.5;
}

.np-consent-banner-inner {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 1rem 1.25rem;
}

.np-consent-text {
  flex: 1;
  color: #374151;
}

.np-consent-text strong {
  color: #111827;
  display: block;
  margin-bottom: 0.25rem;
}

.np-consent-text a {
  color: #2563eb;
  text-decoration: underline;
}

.np-consent-actions {
  display: flex;
  gap: 0.5rem;
  flex-shrink: 0;
}

.np-btn {
  font: inherit;
  padding: 0.55rem 1rem;
  border-radius: 0.5rem;
  border: 1px solid transparent;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.88rem;
  white-space: nowrap;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.np-btn-primary {
  background: #2563eb;
  color: #ffffff;
  border-color: #2563eb;
}
.np-btn-primary:hover { background: #1d4ed8; border-color: #1d4ed8; }

.np-btn-secondary {
  background: #ffffff;
  color: #1f2937;
  border-color: #d1d5db;
}
.np-btn-secondary:hover { background: #f3f4f6; border-color: #9ca3af; }

@media (max-width: 720px) {
  .np-consent-banner-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 0.85rem;
  }
  .np-consent-actions {
    flex-wrap: wrap;
  }
  .np-consent-actions .np-btn {
    flex: 1 1 0;
  }
}

/* ===== Settings modal ===== */
.np-consent-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

.np-consent-modal {
  background: #ffffff;
  color: #1f2937;
  border-radius: 0.85rem;
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.3);
  overflow: hidden;
}

.np-consent-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 1.5rem;
  border-bottom: 1px solid #e5e7eb;
}
.np-consent-modal-header h3 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
  color: #111827;
}

.np-consent-close {
  appearance: none;
  background: transparent;
  border: none;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  color: #6b7280;
  padding: 0.25rem 0.5rem;
}
.np-consent-close:hover { color: #111827; }

.np-consent-modal-body {
  padding: 1.25rem 1.5rem;
  overflow-y: auto;
}

.np-consent-modal-intro {
  margin: 0 0 1rem;
  color: #4b5563;
  font-size: 0.92rem;
}

.np-consent-row {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 0.85rem 0;
  border-top: 1px solid #f3f4f6;
}
.np-consent-row:first-of-type { border-top: none; }

.np-consent-row-text { flex: 1; }
.np-consent-row-title {
  font-weight: 600;
  color: #111827;
  font-size: 0.95rem;
  margin-bottom: 0.2rem;
}
.np-consent-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  color: #047857;
  background: #d1fae5;
  border-radius: 999px;
  padding: 0.1rem 0.55rem;
  margin-left: 0.4rem;
  vertical-align: middle;
}
.np-consent-row-desc {
  color: #6b7280;
  font-size: 0.85rem;
  line-height: 1.5;
}

.np-consent-toggle {
  position: relative;
  display: inline-block;
  width: 42px;
  height: 24px;
  flex-shrink: 0;
  margin-top: 0.15rem;
}
.np-consent-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}
.np-consent-slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background: #d1d5db;
  border-radius: 999px;
  transition: background 0.15s ease;
}
.np-consent-slider::before {
  content: "";
  position: absolute;
  height: 18px; width: 18px;
  left: 3px; top: 3px;
  background: #ffffff;
  border-radius: 50%;
  transition: transform 0.15s ease;
  box-shadow: 0 1px 2px rgba(0,0,0,0.15);
}
.np-consent-toggle input:checked + .np-consent-slider { background: #2563eb; }
.np-consent-toggle input:checked + .np-consent-slider::before { transform: translateX(18px); }
.np-consent-toggle--locked .np-consent-slider { opacity: 0.7; cursor: not-allowed; }

.np-consent-modal-footer {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
  padding: 1rem 1.5rem;
  border-top: 1px solid #e5e7eb;
  background: #f9fafb;
  flex-wrap: wrap;
}

@media (max-width: 540px) {
  .np-consent-modal-footer { justify-content: stretch; }
  .np-consent-modal-footer .np-btn { flex: 1 1 calc(50% - 0.25rem); }
}
