.core-cookie-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10050;
  padding: 0.75rem 1rem;
  padding-bottom: max(0.75rem, env(safe-area-inset-bottom, 0px));
  padding-left: max(1rem, env(safe-area-inset-left, 0px));
  padding-right: max(1rem, env(safe-area-inset-right, 0px));
  background: #fff;
  border-top: 1px solid #e5e9ec;
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.12);
  transform: translateY(100%);
  opacity: 0;
  visibility: hidden;
  transition: transform 0.35s ease, opacity 0.35s ease, visibility 0.35s;
  box-sizing: border-box;
}

.core-cookie-banner.is-visible {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
}

.core-cookie-banner__inner {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.85rem 1.25rem;
  width: 100%;
  min-width: 0;
}

.core-cookie-banner__text {
  flex: 1 1 220px;
  min-width: 0;
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.55;
  color: #444;
}

.core-cookie-banner__text a {
  color: #45b8ac;
  font-weight: 600;
  text-decoration: underline;
}

.core-cookie-banner__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  flex: 1 1 auto;
  min-width: 0;
  justify-content: flex-end;
}

.core-cookie-btn {
  border-radius: 8px;
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 0.5rem 0.85rem;
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  min-height: 40px;
  box-sizing: border-box;
}

.core-cookie-btn--primary {
  background: #45b8ac;
  color: #fff;
  border-color: #45b8ac;
}

.core-cookie-btn--primary:hover {
  background: #3a9b8f;
  border-color: #3a9b8f;
  color: #fff;
}

.core-cookie-btn--secondary {
  background: #fff;
  color: #333;
  border-color: #ced4da;
}

.core-cookie-btn--secondary:hover {
  background: #f8f9fa;
}

.core-cookie-btn--ghost {
  background: transparent;
  color: #45b8ac;
  border-color: transparent;
  text-decoration: underline;
  padding-left: 0.25rem;
  padding-right: 0.25rem;
}

.core-cookie-modal .modal-dialog {
  max-width: 520px;
  margin: 0.75rem auto;
}

.core-cookie-modal .modal-content {
  border-radius: 12px;
  border: none;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.15);
}

.core-cookie-modal .modal-title {
  font-size: 1.125rem;
  font-weight: 600;
}

.core-cookie-category {
  border: 1px solid #edf0f2;
  border-radius: 10px;
  padding: 1rem 1.1rem;
  margin-bottom: 0.75rem;
}

.core-cookie-category__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.core-cookie-category__title {
  font-weight: 600;
  font-size: 0.9375rem;
  margin: 0 0 0.35rem;
  color: #222;
}

.core-cookie-category__desc {
  margin: 0;
  font-size: 0.8125rem;
  color: #6c757d;
  line-height: 1.45;
}

.core-cookie-toggle {
  flex-shrink: 0;
  position: relative;
  width: 44px;
  height: 24px;
}

.core-cookie-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.core-cookie-toggle__slider {
  position: absolute;
  inset: 0;
  background: #ced4da;
  border-radius: 24px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.core-cookie-toggle__slider::before {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  left: 3px;
  bottom: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s ease;
}

.core-cookie-toggle input:checked + .core-cookie-toggle__slider {
  background: #45b8ac;
}

.core-cookie-toggle input:checked + .core-cookie-toggle__slider::before {
  transform: translateX(20px);
}

.core-cookie-toggle input:disabled + .core-cookie-toggle__slider {
  opacity: 0.65;
  cursor: not-allowed;
}

.core-cookie-category--locked .core-cookie-category__badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  color: #6c757d;
  background: #f1f3f5;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  margin-top: 0.35rem;
}

@media (max-width: 991px) {
  .core-cookie-banner__inner {
    flex-direction: column;
    align-items: stretch;
  }

  .core-cookie-banner__text {
    flex: 1 1 auto;
  }

  .core-cookie-banner__actions {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    justify-content: stretch;
  }

  .core-cookie-banner__actions .core-cookie-btn--primary {
    grid-column: 1 / -1;
    order: -1;
  }

  .core-cookie-btn {
    width: 100%;
    white-space: normal;
    text-align: center;
    line-height: 1.3;
    padding: 0.6rem 0.75rem;
    min-height: 44px;
  }

  .core-cookie-btn--ghost {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }
}

@media (max-width: 576px) {
  .core-cookie-banner {
    padding-top: 0.65rem;
  }

  .core-cookie-banner__text {
    font-size: 0.8125rem;
    line-height: 1.5;
  }

  .core-cookie-banner__actions {
    grid-template-columns: 1fr;
  }

  .core-cookie-modal .modal-dialog {
    margin: 0.5rem;
    max-width: calc(100% - 1rem);
  }

  .core-cookie-modal .modal-body {
    padding: 1rem;
  }

  .core-cookie-category {
    padding: 0.85rem;
  }

  .core-cookie-category__head {
    flex-direction: column;
    gap: 0.65rem;
  }

  .core-cookie-toggle {
    align-self: flex-start;
  }

  .core-cookie-modal .modal-footer {
    flex-direction: column-reverse;
    gap: 0.5rem;
  }

  .core-cookie-modal .modal-footer .core-cookie-btn {
    width: 100%;
    margin: 0;
  }
}
