/* ── Onvia Cookie Consent Banner ───────────────────────────────────────────── */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&display=swap');

/* Force hidden state — overrides any theme CSS that might interfere */
#onvia-cc-banner[hidden] {
  display: none !important;
}

#onvia-cc-banner {
  display: block;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  /* Stack above everything including common theme sticky footers/menus */
  z-index: 2147483647;
  background: #1a1a2e;
  color: #f3efe8;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 14px;
  line-height: 1.5;
  box-shadow: 0 -4px 32px rgba(0, 0, 0, 0.25);
  border-top: 3px solid #6e3ce5;
  /* iOS safe area — clears the home indicator bar */
  padding-bottom: env(safe-area-inset-bottom, 0px);
  /* Prevent the page content below from showing through on overscroll */
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
}

.onvia-cc-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 32px;
  flex-wrap: wrap;
  /* Prevent touch events being swallowed by theme overlays */
  pointer-events: all;
}

.onvia-cc-text {
  flex: 1;
  min-width: 240px;
}

.onvia-cc-text strong {
  display: block;
  font-size: 15px;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 4px;
}

.onvia-cc-text p {
  margin: 0;
  color: #c8c4bc;
  font-size: 13px;
}

.onvia-cc-actions {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
  flex-wrap: wrap;
}

.onvia-cc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  /* Large enough tap target for mobile (min 44px) */
  min-height: 44px;
  padding: 10px 22px;
  border-radius: 6px;
  border: 0;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: opacity 0.15s ease, transform 0.1s ease;
  white-space: nowrap;
  /* Prevent iOS from styling buttons as native controls */
  -webkit-appearance: none;
  appearance: none;
  touch-action: manipulation;
}

.onvia-cc-btn:hover  { opacity: 0.88; background-color: #6e3ce5; }
.onvia-cc-btn:active { transform: scale(0.97); }

.onvia-cc-btn:focus-visible {
  outline: 2px solid #f3efe8;
  outline-offset: 2px;
}

/* Accept — brand purple */
.onvia-cc-primary {
  background: #6e3ce5;
  color: #ffffff;
}

/* Reject — transparent outline */
.onvia-cc-secondary {
  background: transparent;
  color: #f3efe8;
  border: 1.5px solid rgba(243, 239, 232, 0.35);
}

.onvia-cc-secondary:hover {
  border-color: rgba(243, 239, 232, 0.7);
  opacity: 1;
}

/* ── Mobile ────────────────────────────────────────────────────────────────── */
@media (max-width: 600px) {
  .onvia-cc-wrap {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    padding: 16px 16px;
  }

  .onvia-cc-text {
    min-width: unset;
    width: 100%;
  }

  .onvia-cc-actions {
    width: 100%;
    flex-direction: column;
    gap: 8px;
  }

  .onvia-cc-btn {
    width: 100%;
    justify-content: center;
  }
}

/* ── Reopen link (shortcode) ───────────────────────────────────────────────── */
a.onvia-cc-reopen {
  color: inherit;
  text-decoration: underline;
  cursor: pointer;
  font-size: inherit;
}
