/* Cookie consent prompt for readyserver.sg.
 *
 * Its own file rather than an addition to css/styles.css, because that file
 * is generated Tailwind output and would lose these rules the next time it
 * is rebuilt. For the same reason this uses plain named classes instead of
 * Tailwind utilities, which may not exist in the generated bundle.
 *
 * Dark mode follows the site's own mechanism: the <head> script puts a
 * `dark` class on <html> from localStorage or the OS preference.
 */

.rs-consent {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  left: 1rem;
  z-index: 60;
  max-width: 32rem;
  margin-inline: auto;
  padding: 1.25rem;
  border: 1px solid #cbd5e1;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 18px 48px rgb(15 23 42 / 0.18);
  font-size: 0.9375rem;
  line-height: 1.6;
  color: #334155;
}

/* The UA rule for [hidden] is display:none, but any display declared on a
   class would beat it. Nothing here sets display, and this makes that safe
   to keep true. */
.rs-consent[hidden],
.rs-consent-reopen[hidden] {
  display: none !important;
}

.rs-consent__title {
  margin: 0 0 0.5rem;
  font-weight: 600;
  color: #0f172a;
}

.rs-consent__text {
  margin: 0 0 1rem;
}

.rs-consent__text a {
  color: #2563eb;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.rs-consent__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.rs-consent__btn {
  padding: 0.55rem 1rem;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #ffffff;
  color: #0f172a;
  font: inherit;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
}

.rs-consent__btn--primary {
  border-color: #2563eb;
  background: #2563eb;
  color: #ffffff;
}

.rs-consent__btn:focus-visible,
.rs-consent-reopen:focus-visible {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
}

/* Footer control that reopens the prompt. */
.rs-consent-reopen {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  font-size: 0.875rem;
  text-decoration: underline;
  text-underline-offset: 0.2em;
  cursor: pointer;
  opacity: 0.8;
}

.rs-consent-reopen:hover {
  opacity: 1;
}

.dark .rs-consent {
  border-color: #334155;
  background: #111a2e;
  color: #cbd5e1;
  box-shadow: 0 18px 48px rgb(0 0 0 / 0.55);
}

.dark .rs-consent__title {
  color: #f8fafc;
}

.dark .rs-consent__text a {
  color: #60a5fa;
}

.dark .rs-consent__btn {
  border-color: #334155;
  background: #111a2e;
  color: #f8fafc;
}

.dark .rs-consent__btn--primary {
  border-color: #2563eb;
  background: #2563eb;
  color: #ffffff;
}

/* Wrapper for the footer control: it sits outside the footer's inner
   containers, so it needs its own centring and spacing. */
.rs-consent-reopen-wrap {
  padding: 0 1rem 1.25rem;
  text-align: center;
}
