/* -----------------------------------------------------------------------------
   PentesterSpace cookie-consent banner — ultra-compact
   Second shrink pass. Same selectors, same markup, same JS API, no behaviour
   change. Lower height, narrower, tighter type and button padding, buttons on
   one row at every size.
   ----------------------------------------------------------------------------- */
#ps-cc {
  position: fixed;
  left: 50%;
  bottom: 10px;
  transform: translate(-50%, calc(100% + 20px));
  width: min(620px, calc(100% - 20px));
  z-index: 2147482000;
  padding: 9px 12px;
  color: var(--ink, #0a0f0b);
  background: var(--surface, #ffffff);
  border: 1px solid var(--line, #d9e2dd);
  border-radius: 10px;
  box-shadow: 0 6px 22px rgba(5, 48, 25, 0.12);
  font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 12px;
  line-height: 1.4;
  transition: transform .3s cubic-bezier(.4, 0, .2, 1);
}
#ps-cc.ps-cc-in { transform: translate(-50%, 0); }

#ps-cc .ps-cc-card {
  display: flex;
  align-items: center;
  gap: 10px;
}

#ps-cc .ps-cc-text { flex: 1 1 auto; min-width: 0; }
#ps-cc .ps-cc-title {
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: -0.005em;
}
#ps-cc p { margin: 0; color: var(--text-2, var(--ink, #4b574f)); font-size: 11.5px; }
#ps-cc a {
  color: var(--green, #0a7a3b);
  text-decoration: underline;
  text-underline-offset: 2px;
}
#ps-cc a:hover { text-decoration-thickness: 2px; }

#ps-cc .ps-cc-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
}

/* Preferences = quiet text link */
#ps-cc .ps-cc-pref {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--text-2, var(--ink, #4b574f));
  font: inherit;
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 2px;
  padding: 4px 2px;
  cursor: pointer;
}
#ps-cc .ps-cc-pref:hover { color: var(--ink, #0a0f0b); text-decoration-thickness: 2px; }
#ps-cc .ps-cc-pref:focus-visible {
  outline: 2px solid var(--green, #0a7a3b);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Accept / Reject — compact pill buttons */
#ps-cc .ps-cc-btn:not(.ps-cc-pref) {
  appearance: none;
  border: 1px solid var(--line, #d9e2dd);
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 7px;
  cursor: pointer;
  transition: background-color .15s, border-color .15s;
  white-space: nowrap;
}
#ps-cc .ps-cc-btn:not(.ps-cc-pref):hover { background: var(--surface-2, rgba(0,0,0,0.03)); }
#ps-cc .ps-cc-btn:focus-visible {
  outline: 2px solid var(--green, #0a7a3b);
  outline-offset: 2px;
}

#ps-cc .ps-cc-accept {
  background: var(--green, #0a7a3b);
  border-color: var(--green, #0a7a3b);
  color: #ffffff;
}
#ps-cc .ps-cc-accept:hover { background: var(--green-dark, #086030); }

/* Close */
#ps-cc .ps-cc-close {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--text-2, var(--ink, #4b574f));
  padding: 3px;
  display: inline-grid;
  place-items: center;
  cursor: pointer;
  border-radius: 5px;
}
#ps-cc .ps-cc-close svg { width: 13px; height: 13px; }
#ps-cc .ps-cc-close:hover { color: var(--ink, #0a0f0b); background: var(--surface-2, rgba(0,0,0,0.04)); }
#ps-cc .ps-cc-close:focus-visible {
  outline: 2px solid var(--green, #0a7a3b);
  outline-offset: 2px;
}

/* Preferences drawer */
#ps-cc .ps-cc-prefs[hidden] { display: none !important; }
#ps-cc .ps-cc-prefs {
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px dashed var(--line, #d9e2dd);
  display: grid;
  gap: 5px;
  font-size: 11.5px;
}
#ps-cc .ps-cc-prefs .ps-cc-title { margin: 0 0 1px; font-size: 11.5px; }
#ps-cc .ps-cc-prefs label {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 7px;
  align-items: start;
  cursor: pointer;
}
#ps-cc .ps-cc-prefs label input {
  margin-top: 2px;
  accent-color: var(--green, #0a7a3b);
}
#ps-cc .ps-cc-prefs label input:disabled { opacity: .55; cursor: not-allowed; }
#ps-cc .ps-cc-prefs span strong { color: var(--ink, #0a0f0b); }
#ps-cc .ps-cc-prefs-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 1px;
}
#ps-cc .ps-cc-save {
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 11.5px;
}

/* Mobile: keep card tight, buttons still on one row */
@media (max-width: 640px) {
  #ps-cc {
    bottom: 6px;
    width: calc(100% - 12px);
    padding: 8px 10px;
    border-radius: 9px;
  }
  #ps-cc .ps-cc-card {
    flex-wrap: wrap;
    gap: 6px 8px;
  }
  #ps-cc .ps-cc-text {
    flex: 1 1 100%;
    padding-right: 18px;         /* room for the close icon in the corner */
  }
  #ps-cc .ps-cc-actions {
    flex: 1 1 100%;
    gap: 6px;
  }
  #ps-cc .ps-cc-pref { margin-right: auto; padding: 3px 0; }
  #ps-cc .ps-cc-btn:not(.ps-cc-pref) {
    padding: 5px 9px;
    font-size: 11.5px;
  }
  #ps-cc .ps-cc-close {
    position: absolute;
    top: 4px;
    right: 4px;
  }
}

@media (prefers-reduced-motion: reduce) {
  #ps-cc { transition: none; }
}
