.aa-consent {
  position: fixed;
  z-index: 100000;
  left: 16px;
  right: 16px;
  bottom: 16px;
  max-width: 600px;
  max-height: calc(100vh - 32px);
  overflow: auto;
  box-sizing: border-box;
  padding: 20px;
  border: 1px solid #d8dee4;
  border-radius: 10px;
  background: #fff;
  color: #212529;
  box-shadow: 0 4px 20px rgba(0, 0, 0, .18);
  font-family: inherit;
  font-size: 15px;
  line-height: 1.5;
  text-align: left;
}
.aa-consent[hidden] { display: none !important; }
.aa-consent[dir="rtl"] { text-align: right; }
.aa-consent .aa-consent__title {
  margin: 0 0 8px;
  font: inherit;
  font-size: 14.4px;
  font-weight: 700;
  line-height: 1.35;
  color: #212529;
}
.aa-consent .aa-consent__description { margin: 0 0 8px; font: inherit; font-size: 12px; }
.aa-consent .aa-consent__privacy { color: #145b93; text-decoration: underline; }
.aa-consent__actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
  margin-top: 16px;
  direction: ltr; /* Approved order: green left, gray right, including RTL. */
}
.aa-consent .aa-consent__button {
  min-width: 0;
  min-height: 48px;
  padding: 10px 12px;
  border: 2px solid transparent;
  border-radius: 6px;
  font: inherit;
  font-weight: 600;
  line-height: 1.35;
  text-align: center;
  white-space: normal;
  overflow-wrap: anywhere;
  cursor: pointer;
  appearance: none;
}
.aa-consent .aa-consent__accept { background: #218838; color: #fff; }
.aa-consent .aa-consent__reject { background: #e9ecef; color: #212529; }
.aa-consent .aa-consent__accept:hover { background: #1a6d2d; }
.aa-consent .aa-consent__reject:hover { background: #dce1e5; }
.aa-consent a:focus, .aa-consent button:focus, .aa-cookie-settings:focus {
  outline: 3px solid #145b93;
  outline-offset: 3px;
}
@media (max-width: 420px) {
  .aa-consent { left: 8px; right: 8px; bottom: 8px; padding: 16px; max-height: calc(100vh - 16px); }
  .aa-consent__actions { gap: 8px; }
  .aa-consent .aa-consent__button { padding: 10px 8px; }
}

/* Independent optional categories; retain the existing compact banner styles. */
.aa-consent [hidden] { display: none !important; }
.aa-consent .aa-consent__customize {
  display: block;
  margin: 8px auto 0;
  padding: 6px 10px;
  border: 0;
  border-radius: 3px;
  background: transparent;
  color: #145b93;
  font: inherit;
  font-size: 12px;
  text-decoration: underline;
  cursor: pointer;
}
.aa-consent__preferences-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.aa-consent .aa-consent__close {
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: #e9ecef;
  color: #212529;
  font: inherit;
  font-size: 24px;
  cursor: pointer;
}
.aa-consent .aa-consent__category {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 12px 0;
  padding: 12px 0;
  border-top: 1px solid #d8dee4;
  font: inherit;
  color: #212529;
  cursor: pointer;
}
.aa-consent__category-copy { min-width: 0; }
.aa-consent__category-title { display: block; font-size: 13px; font-weight: 700; }
.aa-consent__category-description { display: block; margin-top: 4px; font-size: 12px; overflow-wrap: anywhere; }
.aa-consent .aa-consent__toggle {
  appearance: none;
  -webkit-appearance: none;
  flex: 0 0 44px;
  position: relative;
  box-sizing: border-box;
  width: 44px;
  height: 26px;
  margin: 0;
  padding: 0;
  border: 2px solid #6c757d;
  border-radius: 20px;
  background: #e9ecef;
  cursor: pointer;
}
.aa-consent__toggle::before {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #6c757d;
}
.aa-consent .aa-consent__toggle:checked { background: #218838; border-color: #218838; }
.aa-consent__toggle:checked::before { left: 20px; background: #fff; }
.aa-consent[dir="rtl"] .aa-consent__toggle::before { left: 20px; }
.aa-consent[dir="rtl"] .aa-consent__toggle:checked::before { left: 2px; }
.aa-consent .aa-consent__toggle:focus { outline: 3px solid #145b93; outline-offset: 3px; }
.aa-consent__essential { margin: 12px 0; padding: 12px 0; border-top: 1px solid #d8dee4; }
.aa-consent .aa-consent__save { width: 100%; margin-top: 8px; }
@media (forced-colors: active) {
  .aa-consent .aa-consent__toggle { appearance: auto; -webkit-appearance: auto; }
  .aa-consent__toggle::before { display: none; }
}
