/* Cookie consent banner — Aiving sensor webapp (bottom bar + modal, March 2026) */

/* Blocking overlay while consent is pending */
.cookie-consent-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9998;
  background: rgba(0, 0, 0, 0.4);
}

/* Compact bottom bar */
.cookie-consent-bar {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 9999;
  padding: 0 16px 16px;
  pointer-events: none;
}

.cookie-consent-bar-panel {
  pointer-events: auto;
  width: 100%;
  max-width: 64rem;
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
}

.cookie-consent-bar-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px 20px;
}

.cookie-consent-bar-copy {
  flex: 1 1 16rem;
  min-width: 0;
}

.cookie-consent-bar-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

/* Full modal */
.cookie-consent-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.cookie-consent-modal--light {
  background: rgba(0, 0, 0, 0.2);
}

.cookie-consent-panel {
  width: 100%;
  max-width: 36rem;
  overflow: hidden;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
}

@media (min-width: 640px) {
  .cookie-consent-panel {
    max-width: 42rem;
  }
}

.cookie-consent-accent {
  height: 4px;
  background: linear-gradient(to right, var(--primary-color, #0b2182), var(--primary-dark, #08155c));
}

.cookie-consent-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 24px 0;
}

.cookie-consent-title {
  margin: 0;
  font-size: clamp(1.25rem, 2.5vw, 1.5rem);
  font-weight: 700;
  color: var(--primary-color, #0b2182);
}

.cookie-consent-minimize {
  flex-shrink: 0;
  margin: 0;
  padding: 8px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fff;
  color: var(--primary-color, #0b2182);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.cookie-consent-minimize:hover {
  background: #f8fafc;
}

.cookie-consent-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.cookie-consent-tabs {
  display: flex;
  gap: 24px;
  padding: 0 24px;
  margin-top: 16px;
  border-bottom: 1px solid #e5e7eb;
}

.cookie-consent-tab {
  margin: 0;
  padding: 12px 0;
  border: none;
  border-bottom: 2px solid transparent;
  background: none;
  color: #4b5563;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.cookie-consent-tab:hover {
  color: var(--primary-color, #0b2182);
}

.cookie-consent-tab[aria-selected='true'] {
  border-bottom-color: var(--primary-color, #0b2182);
  color: var(--primary-color, #0b2182);
}

.cookie-consent-body {
  padding: 20px 24px;
  max-height: 50vh;
  overflow-y: auto;
}

.cookie-consent-body--policy {
  max-height: min(50vh, 20rem);
}

.cookie-consent-hi {
  margin: 0 0 12px;
  font-weight: 600;
  color: var(--primary-color, #0b2182);
}

.cookie-consent-hi--compact {
  margin-bottom: 6px;
}

.cookie-consent-text {
  margin: 0 0 12px;
  color: #4b5563;
  line-height: 1.65;
}

.cookie-consent-text--compact {
  margin-bottom: 0;
  font-size: 0.9375rem;
}

.cookie-consent-brand {
  font-weight: 600;
  color: var(--primary-color, #0b2182);
}

.cookie-consent-link {
  margin: 0 0 12px;
  padding: 0;
  border: none;
  background: none;
  color: var(--primary-color, #0b2182);
  font: inherit;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}

.cookie-consent-link--inline {
  margin: 0;
  white-space: nowrap;
}

.cookie-consent-link:hover {
  text-decoration: underline;
}

.cookie-consent-signoff {
  margin: 0;
  color: #6b7280;
  line-height: 1.65;
  white-space: pre-line;
}

.cookie-consent-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: flex-end;
  padding: 16px 24px 24px;
  border-top: 1px solid #e5e7eb;
}

.cookie-consent-footer--compact {
  padding: 0;
  border-top: none;
}

.cookie-consent-btn {
  min-width: 120px;
  padding: 10px 18px;
  border: none;
  border-radius: 8px;
  background: var(--primary-color, #0b2182);
  color: #fff;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.cookie-consent-btn--compact {
  min-width: 0;
  padding: 8px 14px;
  font-size: 0.9375rem;
}

.cookie-consent-btn:hover {
  background: var(--primary-dark, #08155c);
}

.cookie-consent-btn:focus-visible,
.cookie-consent-minimize:focus-visible,
.cookie-consent-link:focus-visible {
  outline: 2px solid var(--primary-light, #3a4fb5);
  outline-offset: 2px;
}

.cookie-consent-settings {
  position: fixed;
  bottom: 16px;
  left: 16px;
  z-index: 9998;
  padding: 10px 14px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  color: var(--primary-color, #0b2182);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.cookie-consent-settings:hover {
  background: #f8fafc;
}

.cookie-consent-settings:focus-visible {
  outline: 2px solid var(--primary-light, #3a4fb5);
  outline-offset: 2px;
}

.cookie-consent-policy-status {
  font-style: italic;
}

/* Embedded cookie-policy.en.html (Tailwind-like classes without Tailwind) */
.cookie-consent-policy-html {
  margin-bottom: 12px;
}

.cookie-consent-policy-html .text-sm {
  font-size: 0.875rem;
}

.cookie-consent-policy-html .text-gray-600 {
  color: #4b5563;
}

.cookie-consent-policy-html .text-gray-700 {
  color: #374151;
}

.cookie-consent-policy-html .text-xl {
  font-size: 1.25rem;
}

.cookie-consent-policy-html .font-semibold {
  font-weight: 600;
}

.cookie-consent-policy-html h3 {
  margin: 1.5rem 0 0.75rem;
  color: #111827;
}

.cookie-consent-policy-html p {
  margin: 0 0 1rem;
  line-height: 1.65;
}

.cookie-consent-policy-html ul {
  margin: 0 0 1rem;
  padding-left: 1.5rem;
  list-style: disc;
}

.cookie-consent-policy-html li {
  margin-bottom: 0.25rem;
  line-height: 1.65;
}

.cookie-consent-policy-html a.text-blue-600,
.cookie-consent-policy-html a[class*='text-blue'] {
  color: #2563eb;
  text-decoration: none;
}

.cookie-consent-policy-html a.text-blue-600:hover,
.cookie-consent-policy-html a[class*='text-blue']:hover {
  text-decoration: underline;
}

@media (max-width: 640px) {
  .cookie-consent-bar-inner {
    flex-direction: column;
    align-items: stretch;
  }

  .cookie-consent-bar-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .cookie-consent-link--inline {
    align-self: flex-start;
  }

  .cookie-consent-footer,
  .cookie-consent-footer--compact {
    flex-direction: column;
  }

  .cookie-consent-btn,
  .cookie-consent-btn--compact {
    width: 100%;
  }
}
