/* Shared by public pages and the admin area. Keep page styles out of the consent UI. */
.graxana-consent,
.graxana-consent-preferences {
  box-sizing: border-box;
  color: #352d29;
  font: 15px/1.55 "DM Sans", system-ui, sans-serif;
  text-align: left;
  letter-spacing: normal;
}

.graxana-consent *,
.graxana-consent-preferences * { box-sizing: border-box; }
.graxana-consent[hidden],
.graxana-consent-preferences[hidden] { display: none !important; }

.graxana-consent {
  position: fixed;
  z-index: 10000;
  inset: auto 0 0;
  width: 100%;
  max-height: 85vh;
  max-height: 85dvh;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 28px max(28px, env(safe-area-inset-right)) max(28px, env(safe-area-inset-bottom)) max(28px, env(safe-area-inset-left));
  border: 1px solid #e9d9ca;
  border-bottom: 0;
  border-radius: 28px 28px 0 0;
  background: linear-gradient(115deg, #fff5e9, #fffaf5 55%, #f7f2fc);
  box-shadow: 0 -12px 50px #352d2914;
  animation: graxana-consent-arrive .25s ease-out;
}

.graxana-consent__inner {
  position: relative;
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) minmax(280px, 330px);
  align-items: center;
  gap: 24px;
  max-width: 1240px;
  margin: 0 auto;
  padding-right: 40px;
}

.graxana-consent__icon {
  display: grid;
  place-items: center;
  align-self: start;
  width: 56px;
  height: 56px;
  margin-top: 5px;
  border: 1px solid #ebd1b7;
  border-radius: 18px;
  background: #f9e8d3;
  color: #946235;
}
.graxana-consent__icon svg { display: block; width: 32px; height: 32px; }
.graxana-consent .graxana-consent__eyebrow {
  margin: 0 0 7px;
  color: #8b5b35;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.graxana-consent h2 {
  margin: 0 0 10px;
  color: #352d29;
  font-family: "Manrope", "DM Sans", system-ui, sans-serif;
  font-size: 24px;
  font-weight: 750;
  line-height: 1.2;
  letter-spacing: -.035em;
}
.graxana-consent p { margin: 0; color: #62564e; font-size: 14px; line-height: 1.6; }
.graxana-consent .graxana-consent__note { margin-top: 9px; color: #73665d; font-size: 12px; }
.graxana-consent__actions { display: grid; gap: 13px; text-align: center; }
.graxana-consent__buttons { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.graxana-consent .graxana-consent__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 48px;
  margin: 0;
  padding: 12px 14px;
  border: 1px solid transparent;
  border-radius: 12px;
  font: 700 13px/1.4 "DM Sans", system-ui, sans-serif;
  text-align: center;
  text-transform: none;
  letter-spacing: normal;
  cursor: pointer;
  transition: background .15s, border-color .15s, box-shadow .15s;
}
.graxana-consent .graxana-consent__button--allow { background: #6846e8; color: #fff; border-color: #6846e8; box-shadow: 0 4px 12px #6846e81c; }
.graxana-consent .graxana-consent__button--allow:hover:not(:disabled) { background: #5636cb; border-color: #5636cb; }
.graxana-consent .graxana-consent__button--essential { background: #fffaf5; color: #4f3b2f; border-color: #c4a78f; }
.graxana-consent .graxana-consent__button--essential:hover { background: #f5e7d7; border-color: #997252; }
.graxana-consent .graxana-consent__button:disabled { opacity: .55; box-shadow: none; cursor: not-allowed; }
.graxana-consent .graxana-consent__privacy { color: #6d5546; font-size: 12px; text-decoration: underline; text-underline-offset: 3px; }
.graxana-consent .graxana-consent__privacy:hover { color: #352d29; }
.graxana-consent .graxana-consent__close {
  position: absolute;
  top: -8px;
  right: -8px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  min-height: 44px;
  margin: 0;
  padding: 12px;
  border: 1px solid transparent;
  border-radius: 50%;
  background: transparent;
  color: #73665d;
  box-shadow: none;
  cursor: pointer;
}
.graxana-consent .graxana-consent__close:hover { background: #f2e5d8; color: #352d29; }
.graxana-consent__close svg { display: block; width: 20px; height: 20px; }
.graxana-consent :is(button, a):focus-visible,
.graxana-consent-preferences:focus-visible { outline: 3px solid #6846e8; outline-offset: 3px; }

.graxana-consent-preferences {
  position: fixed;
  z-index: 9999;
  bottom: max(16px, env(safe-area-inset-bottom));
  left: max(16px, env(safe-area-inset-left));
  display: inline-flex;
  align-items: center;
  gap: 7px;
  width: auto;
  max-width: calc(100% - 32px);
  min-height: 44px;
  margin: 0;
  padding: 10px 14px;
  border: 1px solid #dfcbb9;
  border-radius: 999px;
  background: #fff8ef;
  box-shadow: 0 4px 18px #352d2912;
  font-size: 12px;
  font-weight: 650;
  cursor: pointer;
}
.graxana-consent-preferences:hover { background: #f8ead9; border-color: #c4a78f; }
.graxana-consent-preferences svg { display: block; flex: 0 0 18px; width: 18px; height: 18px; color: #946235; }

/* Keep the control clear of the app sidebar account card and its sign-out action. */
.authenticated-app .graxana-consent-preferences {
  right: max(16px, env(safe-area-inset-right));
  left: auto;
}

/* The app's bottom navigation remains visible through the tablet breakpoint. */
@media (max-width: 1023px) {
  .authenticated-app .graxana-consent-preferences {
    bottom: calc(4rem + env(safe-area-inset-bottom));
  }
}

@media (max-width: 1000px) {
  .graxana-consent__inner { grid-template-columns: 48px minmax(0, 1fr); gap: 16px; padding-right: 0; }
  .graxana-consent__icon { width: 48px; height: 48px; border-radius: 16px; }
  .graxana-consent__copy { padding-right: 32px; }
  .graxana-consent__actions { grid-column: 2; grid-template-columns: minmax(280px, 340px) auto; align-items: center; justify-content: start; gap: 20px; }
}
@media (max-width: 600px) {
  .graxana-consent { padding: 20px max(20px, env(safe-area-inset-right)) max(20px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left)); border-radius: 22px 22px 0 0; }
  .graxana-consent__inner { grid-template-columns: 36px minmax(0, 1fr); gap: 12px; }
  .graxana-consent__icon { width: 36px; height: 36px; margin: 0; border-radius: 12px; }
  .graxana-consent__icon svg { width: 24px; height: 24px; }
  .graxana-consent__copy { display: contents; }
  .graxana-consent .graxana-consent__eyebrow { grid-column: 2; align-self: center; margin: 0; padding-right: 28px; font-size: 9px; }
  .graxana-consent h2 { grid-column: 1 / -1; margin: 0; font-size: 22px; }
  .graxana-consent p { grid-column: 1 / -1; font-size: 13px; }
  .graxana-consent .graxana-consent__note { margin: 0; font-size: 11px; }
  .graxana-consent__actions { grid-column: 1 / -1; grid-template-columns: 1fr; gap: 12px; margin-top: 3px; }
  .graxana-consent .graxana-consent__close { top: -4px; right: -8px; }
  .graxana-consent-preferences { bottom: max(12px, env(safe-area-inset-bottom)); left: max(12px, env(safe-area-inset-left)); }
  .authenticated-app .graxana-consent-preferences {
    right: max(12px, env(safe-area-inset-right));
    bottom: calc(4rem + env(safe-area-inset-bottom));
    left: auto;
  }
}
@keyframes graxana-consent-arrive { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) {
  .graxana-consent { animation: none; }
  .graxana-consent .graxana-consent__button { transition: none; }
}

/* RentReminder uses the site's existing palette and type system. */
.graxana-consent,.graxana-consent-preferences { font-family: var(--font-sans, system-ui), sans-serif; color:#143524; }
.graxana-consent { background:#f0fdf4; border-color:#15803d33; border-radius:20px 20px 0 0; }
.graxana-consent h2 { font-family:inherit; color:#143524; }
.graxana-consent p,.graxana-consent .graxana-consent__note { color:#143524; }
.graxana-consent .graxana-consent__button--allow { background:#15803d; color:#ffffff; border-color:#15803d; }
.graxana-consent .graxana-consent__button--essential { background:transparent; color:#143524; border-color:#143524; }
.graxana-consent__icon { background:#f0fdf4; color:#143524; border-color:#15803d; }
.graxana-consent .graxana-consent__eyebrow,.graxana-consent .graxana-consent__privacy { color:#143524; }
.graxana-consent-preferences { background:#f0fdf4; color:#143524; border-color:#15803d66; }

/* Keep preferences reachable without covering forms or navigation. */
body:has([data-analytics-preferences-trigger]) .graxana-consent-preferences { display: none; }
