/* Ultra Cookie Consent – compact corner box (~2.5 KB) */

#ucc-banner,
#ucc-modal,
#ucc-revisit {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  box-sizing: border-box;
  z-index: 99999;
}

#ucc-banner *,
#ucc-modal *,
#ucc-revisit * {
  box-sizing: border-box;
}

/* ========== Compact corner banner (like screenshot) ========== */
#ucc-banner {
  position: fixed;
  width: min(360px, calc(100vw - 32px));
  max-width: 360px;
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  border-radius: 10px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.14), 0 2px 8px rgba(0, 0, 0, 0.06);
  transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Positions */
#ucc-banner.ucc-bottom-left {
  bottom: 20px;
  left: 20px;
  right: auto;
  top: auto;
}

#ucc-banner.ucc-bottom-right {
  bottom: 20px;
  right: 20px;
  left: auto;
  top: auto;
}

#ucc-banner.ucc-top-left {
  top: 20px;
  left: 20px;
  right: auto;
  bottom: auto;
}

#ucc-banner.ucc-top-right {
  top: 20px;
  right: 20px;
  left: auto;
  bottom: auto;
}

/* Hide animation */
#ucc-banner.ucc-hidden {
  opacity: 0;
  pointer-events: none;
}

#ucc-banner.ucc-bottom-left.ucc-hidden,
#ucc-banner.ucc-bottom-right.ucc-hidden {
  transform: translateY(24px);
}

#ucc-banner.ucc-top-left.ucc-hidden,
#ucc-banner.ucc-top-right.ucc-hidden {
  transform: translateY(-24px);
}

#ucc-banner .ucc-content {
  flex: none;
  min-width: 0;
}

#ucc-banner .ucc-title {
  font-weight: 600;
  font-size: 15px;
  margin: 0 0 8px;
  line-height: 1.35;
}

#ucc-banner .ucc-text {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  opacity: 0.92;
}

#ucc-banner .ucc-text a {
  text-decoration: underline;
  color: inherit;
}

/* Actions row: settings link left, buttons right */
#ucc-banner .ucc-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 12px;
  flex-shrink: 0;
}

#ucc-banner .ucc-actions-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

#ucc-banner .ucc-actions-right {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

/* Buttons */
.ucc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 18px;
  border: 1px solid transparent;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s, filter 0.15s;
  white-space: nowrap;
  letter-spacing: 0.02em;
}

.ucc-btn-primary {
  background: var(--ucc-primary, #1a73e8);
  color: #fff;
  border-color: var(--ucc-primary, #1a73e8);
  text-transform: uppercase;
  font-size: 12px;
  padding: 10px 20px;
}

.ucc-btn-primary:hover {
  filter: brightness(1.08);
}

.ucc-btn-secondary {
  background: transparent;
  color: inherit;
  border-color: rgba(0, 0, 0, 0.2);
  font-weight: 500;
  font-size: 12px;
  padding: 8px 12px;
}

.ucc-btn-secondary:hover {
  background: rgba(0, 0, 0, 0.04);
}

.ucc-btn-ghost {
  background: transparent;
  color: var(--ucc-primary, #1a73e8);
  border-color: transparent;
  text-decoration: underline;
  text-underline-offset: 3px;
  padding: 8px 4px;
  font-weight: 500;
  font-size: 13px;
  text-transform: none;
  letter-spacing: 0;
}

.ucc-btn-ghost:hover {
  opacity: 0.8;
}

/* ========== Modal (preferences) ========== */
#ucc-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s, visibility 0.25s;
}

#ucc-modal-overlay.ucc-open {
  opacity: 1;
  visibility: visible;
}

#ucc-modal {
  background: #fff;
  color: #222;
  border-radius: 10px;
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow: auto;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
  transform: translateY(12px);
  transition: transform 0.25s;
}

#ucc-modal-overlay.ucc-open #ucc-modal {
  transform: translateY(0);
}

#ucc-modal .ucc-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid #eee;
}

#ucc-modal .ucc-modal-header h2 {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
}

#ucc-modal .ucc-close {
  background: none;
  border: none;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  padding: 4px 8px;
  color: #666;
}

#ucc-modal .ucc-close:hover {
  color: #111;
}

#ucc-modal .ucc-modal-body {
  padding: 12px 20px 20px;
}

.ucc-cat {
  padding: 14px 0;
  border-bottom: 1px solid #f0f0f0;
}

.ucc-cat:last-child {
  border-bottom: none;
}

.ucc-cat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.ucc-cat-label {
  font-weight: 600;
  font-size: 14px;
}

.ucc-cat-desc {
  margin: 6px 0 0;
  font-size: 13px;
  color: #555;
  line-height: 1.4;
}

/* Toggle switch */
.ucc-switch {
  position: relative;
  width: 42px;
  height: 24px;
  flex-shrink: 0;
}

.ucc-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.ucc-switch .ucc-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: #ccc;
  border-radius: 24px;
  transition: background 0.2s;
}

.ucc-switch .ucc-slider::before {
  content: "";
  position: absolute;
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s;
}

.ucc-switch input:checked + .ucc-slider {
  background: var(--ucc-primary, #1a73e8);
}

.ucc-switch input:checked + .ucc-slider::before {
  transform: translateX(18px);
}

.ucc-switch input:disabled + .ucc-slider {
  opacity: 0.55;
  cursor: not-allowed;
}

#ucc-modal .ucc-modal-footer {
  padding: 12px 20px 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

/* Revisit button */
#ucc-revisit {
  position: fixed;
  bottom: 16px;
  left: 16px;
  padding: 8px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
  border: none;
  display: none;
  align-items: center;
  gap: 6px;
  transition: transform 0.15s, box-shadow 0.15s;
}

#ucc-revisit:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
}

#ucc-revisit.ucc-visible {
  display: inline-flex;
}

/* Mobile */
@media (max-width: 420px) {
  #ucc-banner {
    width: calc(100vw - 24px);
    max-width: none;
    left: 12px !important;
    right: 12px !important;
    bottom: 12px;
  }

  #ucc-banner.ucc-top-left,
  #ucc-banner.ucc-top-right {
    top: 12px;
    bottom: auto;
  }

  #ucc-banner .ucc-actions {
    flex-direction: column;
    align-items: stretch;
  }

  #ucc-banner .ucc-actions-left,
  #ucc-banner .ucc-actions-right {
    margin-left: 0;
    width: 100%;
    justify-content: space-between;
  }

  #ucc-banner .ucc-actions-right .ucc-btn-primary {
    flex: 1;
  }
}
