.cookie-banner {
  position: fixed !important;
  bottom: 0 !important;
  left: 0 !important;
  right: 0 !important;
  top: auto !important;
  background-color: white;
  z-index: 99999 !important;
  padding: 16px 0;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
  transition: opacity 0.3s ease-in-out;
  width: 100% !important;
}

.cookie-banner-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 22px 80px;
  position: relative;
}

.cookie-banner-left {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1;
}

.cookie-banner-icon svg {
  width: 50px;
  height: 50px;
}

.cookie-banner-content {
  display: flex;
  flex-direction: column;
}

.cookie-banner-title {
  font-weight: 500;
  font-size: 24px;
  font-family: inherit;
  line-height: 1.4;
  color: #0c1937;
}

.cookie-banner-description {
  font-weight: 450;
  font-size: 16px;
  color: #0c1937;
}

.cookie-banner-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.cookie-banner-manage {
  box-sizing: border-box;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  padding: 0px 24px;
  gap: 8px;
  height: 48px;
  background: transparent;
  border: 1px solid #b4b8c1;
  border-radius: 999px;
  font-weight: 750;
  font-size: 16px;
  color: #0c1937;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  flex: none;
  order: 1;
  flex-grow: 0;
}

.cookie-banner-manage:hover {
  background-color: #f5f5f5;
  border-color: #999999;
}

.cookie-banner-accept {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  padding: 0px 24px;
  gap: 8px;
  height: 48px;
  background: #32baf6;
  border: none;
  border-radius: 999px;
  font-weight: 750;
  font-size: 16px;
  color: white;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  flex: none;
  order: 2;
  flex-grow: 0;
}

.cookie-banner-accept:hover {
  background-color: #2a9de6;
}

.cookie-banner-close {
  box-sizing: border-box;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  padding: 0px;
  gap: 8px;
  width: 48px;
  height: 48px;
  background: transparent;
  border: 1px solid #b4b8c1;
  border-radius: 999px;
  color: #1a1a1a;
  cursor: pointer;
  transition: all 0.2s ease;
  flex: none;
  order: 3;
  flex-grow: 0;
}

.cookie-banner-close:hover {
  background: #f5f5f5;
  border-color: #999999;
}

.cookie-banner-close svg {
  width: 21px;
  height: 21px;
}

body.cookie-banner-visible {
  padding-top: 0;
}

body.cookie-banner-hidden {
  padding-top: 0;
}

@media (max-width: 768px) {
  .cookie-banner {
    top: auto !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    transform: none !important;
    width: 100% !important;
    max-width: 100% !important;
    border-radius: 24px 24px 0 0;
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.1);
  }

  .cookie-banner-container {
    flex-direction: column;
    align-items: stretch;
    gap: 20px;
    padding: 24px 20px 32px 20px;
    position: relative;
  }

  .cookie-banner-left {
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    padding: 0;
    padding-right: 48px;
  }

  .cookie-banner-icon {
    width: 56px;
    height: 56px;
    flex-shrink: 0;
    position: relative;
    top: auto;
    left: auto;
  }

  .cookie-banner-icon svg {
    width: 50px;
    height: 55px;
  }

  .cookie-banner-content {
    width: 100%;
    text-align: left;
    padding: 0;
  }

  .cookie-banner-title {
    font-size: 20px;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 8px;
  }

  .cookie-banner-close {
    position: absolute;
    top: 24px;
    right: 20px;
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
    border: 1px solid #e0e0e0;
  }

  .cookie-banner-close svg {
    width: 16px;
    height: 16px;
  }

  .cookie-banner-actions {
    flex-direction: column;
    justify-content: stretch;
    width: 100%;
    gap: 12px;
  }

  .cookie-banner-accept {
    width: 100%;
    min-height: 56px;
    height: 56px;
    padding: 0px 24px;
    font-size: 16px;
    font-weight: 600;
    order: 1;
  }

  .cookie-banner-manage {
    width: 100%;
    min-height: 56px;
    height: 56px;
    padding: 0px 24px;
    font-size: 16px;
    font-weight: 600;
    order: 2;
    background: white;
  }

  body.cookie-banner-visible {
    padding-bottom: 0;
  }
}

.cookie-preferences-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 100000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
}

.cookie-preferences-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
}

.cookie-preferences-content {
  position: relative;
  background: #ffffff;
  border-radius: 20px;
  max-width: 520px;
  width: 100%;
  max-height: calc(100vh - 40px);
  display: flex;
  flex-direction: column;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
  overflow: hidden;
}

.cookie-preferences-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 24px 16px 24px;
  flex-shrink: 0;
}

.cookie-preferences-header h2 {
  font-family: system-ui !important;
  font-weight: 450;
  font-size: 24px;
  line-height: 1.4;
  color: #0c1937;
}

.cookie-preferences-close {
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: all 0.2s ease;
  color: #111c2f;
}

.cookie-preferences-close:hover {
  background-color: #f0f0f0;
  color: #111c2f;
}

.cookie-preferences-close svg {
  width: 24px;
  height: 24px;
}

.cookie-preferences-body {
  padding: 0 24px 20px 24px;
  overflow-y: auto;
  flex: 1;
}

.cookie-preferences-intro {
  font-size: 18px;
  line-height: 150%;
  color: #0c1937;
  margin: 0 0 24px 0;
}

.cookie-terms-link {
  color: #32baf6 !important;
  text-decoration: none;
  transition: color 0.2s ease;
  font-weight: 550;
}

.cookie-terms-link:hover {
  color: #2a9de6 !important;
  text-decoration: underline;
}

.cookie-preference-item {
  margin-bottom: 24px;
}

.cookie-preference-item:last-child {
  margin-bottom: 0;
}

.cookie-preference-label {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  user-select: none;
  margin-bottom: 8px;
}

.cookie-preference-label
  input[data-category="essential"]
  ~ .cookie-preference-name {
  cursor: default;
  font-family: system-ui;
  font-weight: 600 !important;
}
.cookie-preference-label
  input[data-category="nonEssential"]:checked
  ~ .cookie-preference-name {
  cursor: default;
  font-family: system-ui;
  font-weight: 600 !important;
}

.cookie-preference-checkbox {
  width: 22px;
  height: 22px;
  margin-top: 2px;
  cursor: pointer;
  flex-shrink: 0;
  border-radius: 4px;
  appearance: none;
  -webkit-appearance: none;
  border: 2px solid #b4b8c1;
  background: #ffffff;
  transition:
    border-color 0.2s ease,
    background 0.2s ease,
    background-image 0.2s ease;
}

.cookie-preference-checkbox:checked {
  background: #32baf6;
  border-color: #32baf6;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E");
}

.cookie-preference-checkbox[data-category="essential"],
input.cookie-preference-checkbox[data-category="essential"] {
  background: #e0e0e0 !important;
  border-color: #a0a0a0 !important;
  cursor: not-allowed;
}

.cookie-preference-checkbox[data-category="essential"]:checked,
input.cookie-preference-checkbox[data-category="essential"]:checked {
  background: #e0e0e0 !important;
  border-color: #a0a0a0 !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23A0A0A0' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E") !important;
}

.cookie-preference-name {
  font-family: inherit;
  font-weight: 500;
  font-size: 18px;
  color: #0c1937;
  line-height: 1.4;
}

.cookie-preference-text {
  font-size: 16px;
  line-height: 1.6;
  color: #0c1937;
  margin: 0;
  font-weight: 400;
}

.cookie-preferences-footer {
  display: flex;
  justify-content: flex-end;
  padding: 24px 24px 24px 24px;
  flex-shrink: 0;
}

.cookie-preferences-save {
  font-family: inherit;
  font-weight: 700;
  font-size: 16px;
  padding: 14px 32px;
  min-height: 48px;
  border: none;
  border-radius: 9999px;
  cursor: pointer;
  transition: background-color 0.2s ease;
  background-color: #32baf6;
  color: #ffffff;
}

.cookie-preferences-save:hover {
  background-color: #2a9de6;
}

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

@media (min-width: 769px) {
  .cookie-preferences-content {
    border-radius: 16px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
  }
}

@media (max-width: 768px) {
  .cookie-preferences-modal {
    padding: 20px;
    align-items: center;
    justify-content: center;
  }

  .cookie-preferences-content {
    max-width: calc(100% - 40px);
    width: 100%;
    border-radius: 20px;
    max-height: calc(100vh - 40px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
  }

  .cookie-preferences-header {
    padding: 20px 20px 16px 20px;
  }

  .cookie-preferences-header h2 {
    font-size: 22px;
  }

  .cookie-preferences-body {
    padding: 0 20px 20px 20px;
  }

  .cookie-preferences-intro {
    font-size: 16px;
    margin-bottom: 20px;
  }

  .cookie-preference-name {
    cursor: default;
    font-family: inherit;
    font-weight: 600;
  }

  .cookie-preference-text {
    padding-left: 34px;
    margin-top: 4px;
  }

  .cookie-preferences-footer {
    padding: 20px 20px 28px 20px;
    justify-content: stretch;
  }

  .cookie-preferences-save {
    width: 100%;
    min-height: 56px;
    padding: 16px 24px;
  }
}
