/*
 * GK Arm consent banner styles
 * Safe to paste into Bitrix24 custom HTML/CSS block.
 */

:root {
  --gka-consent-bg: #ffffff;
  --gka-consent-text: #1f2933;
  --gka-consent-muted: #52616b;
  --gka-consent-border: #d9e2ec;
  --gka-consent-accent: #111827;
  --gka-consent-accent-text: #ffffff;
  --gka-consent-overlay: rgba(15, 23, 42, 0.42);
  --gka-consent-radius: 16px;
  --gka-consent-shadow: 0 18px 48px rgba(15, 23, 42, 0.18);
}

.gka-consent-hidden {
  display: none !important;
}

.gka-consent-banner,
.gka-consent-modal {
  box-sizing: border-box;
  font-family: inherit;
  color: var(--gka-consent-text);
}

.gka-consent-banner *,
.gka-consent-modal * {
  box-sizing: border-box;
}

.gka-consent-banner {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 2147483000;
  max-width: 1160px;
  margin: 0 auto;
  padding: 20px;
  background: var(--gka-consent-bg);
  border: 1px solid var(--gka-consent-border);
  border-radius: var(--gka-consent-radius);
  box-shadow: var(--gka-consent-shadow);
}

.gka-consent-banner__title {
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 1.35;
  font-weight: 700;
}

.gka-consent-banner__text {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--gka-consent-muted);
}

.gka-consent-banner__text a,
.gka-consent-modal a,
.gka-consent-footer-link {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.gka-consent-banner__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.gka-consent-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid var(--gka-consent-border);
  background: #ffffff;
  color: var(--gka-consent-text);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}

.gka-consent-button:focus-visible {
  outline: 3px solid rgba(17, 24, 39, 0.28);
  outline-offset: 2px;
}

.gka-consent-button:hover {
  transform: translateY(-1px);
}

.gka-consent-button--primary {
  background: var(--gka-consent-accent);
  border-color: var(--gka-consent-accent);
  color: var(--gka-consent-accent-text);
}

.gka-consent-button--ghost {
  background: transparent;
}

.gka-consent-overlay {
  position: fixed;
  inset: 0;
  z-index: 2147483001;
  background: var(--gka-consent-overlay);
}

.gka-consent-modal {
  position: fixed;
  z-index: 2147483002;
  left: 50%;
  top: 50%;
  width: min(680px, calc(100vw - 32px));
  max-height: min(720px, calc(100vh - 32px));
  overflow: auto;
  transform: translate(-50%, -50%);
  background: var(--gka-consent-bg);
  border: 1px solid var(--gka-consent-border);
  border-radius: var(--gka-consent-radius);
  box-shadow: var(--gka-consent-shadow);
  padding: 24px;
}

.gka-consent-modal__header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.gka-consent-modal__title {
  margin: 0;
  font-size: 22px;
  line-height: 1.3;
  font-weight: 700;
}

.gka-consent-modal__close {
  flex: 0 0 auto;
  border: 0;
  background: transparent;
  color: var(--gka-consent-text);
  font: inherit;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.gka-consent-modal__intro {
  margin: 12px 0 20px;
  color: var(--gka-consent-muted);
  font-size: 14px;
  line-height: 1.55;
}

.gka-consent-category {
  padding: 14px 0;
  border-top: 1px solid var(--gka-consent-border);
}

.gka-consent-category:last-of-type {
  border-bottom: 1px solid var(--gka-consent-border);
}

.gka-consent-category__row {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  justify-content: space-between;
}

.gka-consent-category__title {
  margin: 0 0 4px;
  font-size: 16px;
  line-height: 1.35;
  font-weight: 700;
}

.gka-consent-category__description {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
  color: var(--gka-consent-muted);
}

.gka-consent-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
}

.gka-consent-toggle input {
  width: 1px;
  height: 1px;
  opacity: 0;
  position: absolute;
}

.gka-consent-toggle__visual {
  width: 46px;
  height: 26px;
  border-radius: 999px;
  background: #cbd5e1;
  position: relative;
  transition: background 0.15s ease;
}

.gka-consent-toggle__visual::after {
  content: "";
  position: absolute;
  width: 22px;
  height: 22px;
  left: 2px;
  top: 2px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.25);
  transition: transform 0.15s ease;
}

.gka-consent-toggle input:checked + .gka-consent-toggle__visual {
  background: var(--gka-consent-accent);
}

.gka-consent-toggle input:checked + .gka-consent-toggle__visual::after {
  transform: translateX(20px);
}

.gka-consent-toggle input:disabled + .gka-consent-toggle__visual {
  opacity: 0.72;
  cursor: not-allowed;
}

.gka-consent-modal__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.gka-consent-footer-link {
  cursor: pointer;
  background: transparent;
  border: 0;
  padding: 0;
  font: inherit;
}

@media (max-width: 640px) {
  .gka-consent-banner {
    left: 10px;
    right: 10px;
    bottom: 10px;
    padding: 16px;
  }

  .gka-consent-banner__actions,
  .gka-consent-modal__actions {
    flex-direction: column;
  }

  .gka-consent-button {
    width: 100%;
  }

  .gka-consent-modal {
    padding: 18px;
  }

  .gka-consent-category__row {
    gap: 12px;
  }
}