.ag-consent[hidden] {
  display: none !important;
}

.ag-consent {
  position: fixed;
  z-index: 10000;
  right: auto;
  bottom: 18px;
  left: 50%;
  display: flex;
  width: min(900px, calc(100% - 36px));
  max-width: none;
  margin: 0;
  padding: 18px;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  border: 1px solid #dfe3e8;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 50px rgba(17, 24, 39, .18);
  color: #111827;
  font-family: Arial, sans-serif;
  box-sizing: border-box;
  transform: translateX(-50%);
}

.ag-consent__copy strong {
  display: block;
  margin-bottom: 5px;
  font-size: .95rem;
}

.ag-consent__copy p {
  margin: 0;
  font-size: .82rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.ag-consent__copy a {
  color: inherit;
}

.ag-consent__actions {
  display: flex;
  flex: 0 0 auto;
  min-width: 0;
  max-width: 100%;
  gap: 8px;
  box-sizing: border-box;
}

.ag-consent__actions button {
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid #111827;
  border-radius: 4px;
  background: #fff;
  color: #111827;
  cursor: pointer;
  font: 700 .78rem/1 Arial, sans-serif;
}

.ag-consent__actions .ag-consent__accept {
  background: #111827;
  color: #fff;
}

.ag-consent__actions button:focus-visible {
  outline: 3px solid #f0cfd0;
  outline-offset: 2px;
}

@media (max-width: 680px) {
  .ag-consent {
    right: 8px;
    bottom: 8px;
    bottom: calc(var(--ag-consent-viewport-bottom, 0px) + 8px + env(safe-area-inset-bottom));
    left: 8px;
    width: auto;
    max-width: none;
    max-height: calc(100vh - 16px);
    max-height: calc(var(--ag-consent-viewport-height, 100dvh) - 16px - env(safe-area-inset-bottom));
    padding: 12px;
    align-items: stretch;
    flex-direction: column;
    gap: 10px;
    border-radius: 7px;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    transform: none;
  }

  .ag-consent__copy {
    width: 100%;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
  }

  .ag-consent__copy strong {
    margin-bottom: 3px;
    font-size: .86rem;
  }

  .ag-consent__copy p {
    font-size: .76rem;
    line-height: 1.4;
  }

  .ag-consent__actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    max-width: 100%;
    flex: 0 0 auto;
    background: #fff;
    overflow: hidden;
  }

  .ag-consent__actions button {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    min-height: 44px;
    padding: 0 10px;
    flex: none;
    box-sizing: border-box;
  }
}
