.grm-cookie-root {
  position: fixed;
  z-index: 160;
  inset: auto 0 0 0;
  pointer-events: none;
}

.grm-cookie-banner,
.grm-cookie-manage,
.grm-cookie-panel {
  pointer-events: auto;
}

.grm-cookie-banner {
  position: fixed;
  right: 18px;
  bottom: 18px;
  width: min(460px, calc(100vw - 24px));
  padding: 15px 15px 14px;
  border-radius: 16px;
  border: 1px solid #cfe0fb;
  background: rgba(252, 254, 255, 0.97);
  box-shadow: 0 16px 34px rgba(45, 82, 141, 0.18);
  backdrop-filter: blur(6px);
}

.grm-cookie-banner h2 {
  margin: 0 0 7px;
  font-family: "Sora", "Manrope", sans-serif;
  font-size: 1.02rem;
  color: #233d67;
}

.grm-cookie-banner p {
  margin: 0;
  color: #4d6992;
  font-size: 0.92rem;
  line-height: 1.48;
}

.grm-cookie-banner p a {
  color: #2f5ca1;
  font-weight: 700;
  text-decoration: underline;
}

.grm-cookie-actions {
  margin-top: 11px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.grm-cookie-btn {
  border-radius: 10px;
  border: 1px solid #c6d9f7;
  background: #f7fbff;
  color: #355886;
  font-family: "Manrope", "Segoe UI", "Roboto", sans-serif;
  font-weight: 700;
  font-size: 0.88rem;
  line-height: 1;
  min-height: 39px;
  padding: 10px 12px;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.grm-cookie-btn:hover {
  transform: translateY(-1px);
  background: #edf5ff;
  box-shadow: 0 8px 16px rgba(53, 89, 150, 0.12);
}

.grm-cookie-btn.primary {
  border: 0;
  color: #fff;
  background: linear-gradient(140deg, #4b79d8, #305aac);
  box-shadow: 0 10px 22px rgba(52, 93, 171, 0.24);
}

.grm-cookie-btn.ghost {
  background: #f8fbff;
}

.grm-cookie-manage {
  position: fixed;
  left: 16px;
  bottom: 16px;
  min-height: 36px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid #c9dbf9;
  background: rgba(248, 252, 255, 0.96);
  color: #31578f;
  font-family: "Manrope", "Segoe UI", "Roboto", sans-serif;
  font-size: 0.83rem;
  font-weight: 700;
  box-shadow: 0 8px 18px rgba(45, 82, 141, 0.13);
  cursor: pointer;
}

.grm-cookie-manage:hover {
  background: #edf5ff;
}

.grm-cookie-modal {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 16px;
  z-index: 220;
  pointer-events: auto;
}

.grm-cookie-banner[hidden],
.grm-cookie-manage[hidden],
.grm-cookie-modal[hidden] {
  display: none !important;
}

.grm-cookie-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(24, 40, 66, 0.38);
  backdrop-filter: blur(2px);
  z-index: 0;
}

.grm-cookie-panel {
  position: relative;
  width: min(620px, calc(100vw - 22px));
  border-radius: 18px;
  border: 1px solid #d4e4fb;
  background: #ffffff;
  box-shadow: 0 24px 44px rgba(31, 58, 100, 0.23);
  padding: 18px;
  z-index: 1;
}

.grm-cookie-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.grm-cookie-panel-head h2 {
  margin: 0;
  font-family: "Sora", "Manrope", sans-serif;
  font-size: 1.23rem;
  color: #1f385f;
}

.grm-cookie-close {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid #cde0fc;
  background: #f4f9ff;
  color: #365989;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
}

.grm-cookie-panel-sub {
  margin: 8px 0 14px;
  color: #5d7499;
  line-height: 1.5;
  font-size: 0.94rem;
}

.grm-cookie-option {
  border: 1px solid #d9e8fc;
  border-radius: 12px;
  background: #f8fbff;
  padding: 12px 12px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.grm-cookie-option + .grm-cookie-option {
  margin-top: 10px;
}

.grm-cookie-option h3 {
  margin: 0 0 4px;
  font-family: "Sora", "Manrope", sans-serif;
  font-size: 0.96rem;
  color: #274771;
}

.grm-cookie-option p {
  margin: 0;
  color: #5d769d;
  font-size: 0.88rem;
  line-height: 1.45;
}

.grm-cookie-switch {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.82rem;
  font-weight: 700;
  color: #345983;
  white-space: nowrap;
}

.grm-cookie-switch input {
  width: 16px;
  height: 16px;
  accent-color: #4a79d8;
}

.grm-cookie-panel-actions {
  margin-top: 14px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

body.grm-cookie-modal-open {
  overflow: hidden;
}

@media (max-width: 640px) {
  .grm-cookie-banner {
    left: 12px;
    right: 12px;
    bottom: 12px;
    width: auto;
  }

  .grm-cookie-manage {
    left: 12px;
    bottom: 12px;
  }

  .grm-cookie-panel {
    padding: 14px;
    border-radius: 14px;
  }

  .grm-cookie-panel-actions {
    justify-content: stretch;
  }

  .grm-cookie-panel-actions .grm-cookie-btn {
    flex: 1 1 100%;
  }
}
