.ebs-cookie-panel {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 10000;
  max-width: 520px;
  padding: 20px;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
  color: #222;
  font: 14px/1.45 Arial, sans-serif;
}

.ebs-cookie-panel[hidden] {
  display: none;
}

.ebs-cookie-panel__close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #555;
  cursor: pointer;
  font-size: 24px;
  line-height: 32px;
}

.ebs-cookie-panel__close:hover {
  background: #f5f5f5;
  color: #222;
}

.ebs-cookie-panel__title {
  margin: 0 0 8px;
  padding-right: 44px;
  font-weight: 700;
  font-size: 16px;
}

.ebs-cookie-panel__text {
  margin: 0 0 14px;
}

.ebs-cookie-panel__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.ebs-cookie-panel__button {
  border: 1px solid #d9d9d9;
  border-radius: 8px;
  padding: 9px 14px;
  background: #fff;
  color: #222;
  cursor: pointer;
}

.ebs-cookie-panel__button--primary {
  border-color: #e31e24;
  background: #e31e24;
  color: #fff;
}

@media (max-width: 767px) {
  .ebs-cookie-panel {
    right: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom));
    left: 12px;
    max-width: none;
    display: grid;
    grid-template-columns: 1fr auto auto;
    grid-template-areas:
      "title actions close"
      "text  actions close";
    align-items: center;
    column-gap: 8px;
    padding: 10px 6px 10px 14px;
    border-radius: 14px;
    font-size: 13px;
    line-height: 1.3;
  }

  .ebs-cookie-panel__title {
    grid-area: title;
    margin: 0;
    padding-right: 0;
    font-size: 13px;
    font-weight: 600;
  }

  .ebs-cookie-panel__text {
    grid-area: text;
    margin: 2px 0 0;
    font-size: 12px;
  }

  .ebs-cookie-panel__actions {
    grid-area: actions;
    flex-wrap: nowrap;
  }

  .ebs-cookie-panel__button {
    min-height: 40px;
    padding: 8px 16px;
    font-size: 14px;
  }

  .ebs-cookie-panel__close {
    grid-area: close;
    position: static;
    width: 40px;
    height: 40px;
    line-height: 40px;
  }
}

/* Keep the panel above the mobile action bar (MobileActionBar.tsx). */
@media (max-width: 1023px) {
  body.ebs-mobile-bar-on .ebs-cookie-panel {
    bottom: calc(76px + env(safe-area-inset-bottom));
  }
}
