.sp-consent-backdrop {
  position: fixed;
  inset: 0;
  z-index: 99998;
  background: rgba(5, 8, 15, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.sp-consent-backdrop.is-visible {
  opacity: 1;
  visibility: visible;
}

.sp-consent-modal {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 99999;
  width: min(560px, calc(100% - 32px));
  transform: translate(-50%, 24px);
  background:
    linear-gradient(180deg, rgba(18, 24, 38, 0.98), rgba(8, 12, 22, 0.98));
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 22px;
  box-shadow:
    0 24px 70px rgba(0, 0, 0, 0.5),
    0 0 40px rgba(82, 120, 255, 0.08);
  color: #ffffff;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.25s ease,
    transform 0.25s ease,
    visibility 0.25s ease;
  overflow: hidden;
}

.sp-consent-modal.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}

.sp-consent-content {
  padding: 24px;
}

.sp-consent-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}

.sp-consent-header img {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  object-fit: contain;
  object-position: center;
}

.sp-consent-title {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.2;
}

.sp-consent-text {
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 14px;
  line-height: 1.6;
}

.sp-consent-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 22px;
}

.sp-consent-btn {
  min-height: 46px;
  border: 0;
  border-radius: 14px;
  padding: 0 18px;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition:
    transform 0.18s ease,
    opacity 0.18s ease,
    box-shadow 0.18s ease;
}

.sp-consent-btn:hover {
  transform: translateY(-1px);
}

.sp-consent-btn:active {
  transform: translateY(0);
}

.sp-consent-btn--reject {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.sp-consent-btn--accept {
  color: #ffffff;
  background: linear-gradient(135deg, #ec2f9b, #7a55ff 50%, #10b8ef);
  box-shadow: 0 10px 26px rgba(81, 109, 255, 0.24);
}

.sp-consent-reopen {
  position: fixed;
  left: 18px;
  bottom: 14px;
  z-index: 99997;
  width: 72px;
  height: 72px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition:
    opacity 0.22s ease,
    transform 0.22s ease,
    visibility 0.22s ease;
}

.sp-consent-reopen.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.sp-consent-reopen img {
  display: block;
  width: 68px;
  height: 68px;
  object-fit: contain;
  object-position: center;
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.28));
}
.sp-consent-reopen:hover {
  transform: translateY(-2px) scale(1.03);
}
.sp-consent-reopen::after {
  content: attr(data-tooltip);
  position: absolute;
  left: calc(100% + 10px);
  top: 50%;
  transform: translateY(-50%) translateX(-4px);
  padding: 7px 10px;
  border-radius: 8px;
  background: rgba(15, 20, 32, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #ffffff;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.32);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 0.18s ease,
    transform 0.18s ease,
    visibility 0.18s ease;
}

.sp-consent-reopen:hover::after {
  opacity: 1;
  visibility: visible;
  transform: translateY(-50%) translateX(0);
}

@media (max-width: 600px) {
  .sp-consent-reopen::after {
    display: none;
  }
}

@media (max-width: 600px) {
  .sp-consent-modal {
    bottom: 16px;
    width: calc(100% - 24px);
    border-radius: 18px;
  }

  .sp-consent-content {
    padding: 20px;
  }

  .sp-consent-actions {
    grid-template-columns: 1fr;
  }

  .sp-consent-reopen {
  left: 14px;
  bottom: 15px;
  width: 68px;
  height: 68px;
}

.sp-consent-reopen img {
  width: 72px;
  height: 72px;
  object-fit: contain;
  object-position: center;
}
}
.sp-consent-settings {
  margin-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sp-consent-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 0;
}

.sp-consent-row + .sp-consent-row {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.sp-consent-row-copy {
  flex: 1;
  min-width: 0;
}

.sp-consent-row-title {
  margin-bottom: 5px;
  color: #ffffff;
  font-size: 15px;
  font-weight: 700;
}

.sp-consent-row-text {
  color: rgba(255, 255, 255, 0.58);
  font-size: 12px;
  line-height: 1.5;
}

.sp-consent-always {
  flex: 0 0 auto;
  color: #82ef9b;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.sp-consent-switch {
  position: relative;
  display: inline-block;
  flex: 0 0 46px;
  width: 46px;
  height: 26px;
  cursor: pointer;
}

.sp-consent-switch input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.sp-consent-slider {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.15);
  transition: 0.22s ease;
}

.sp-consent-slider::before {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.28);
  transition: transform 0.22s ease;
}

.sp-consent-switch input:checked + .sp-consent-slider {
  background: linear-gradient(135deg, #ec2f9b, #7955ff 52%, #10b8ef);
  border-color: transparent;
}

.sp-consent-switch input:checked + .sp-consent-slider::before {
  transform: translateX(20px);
}

.sp-consent-actions--three {
  grid-template-columns: 1fr 1.2fr 1fr;
}

.sp-consent-btn--save {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

@media (max-width: 600px) {
  .sp-consent-row {
    gap: 14px;
    padding: 16px 0;
  }

  .sp-consent-row-text {
    font-size: 11px;
  }

  .sp-consent-always {
    max-width: 90px;
    white-space: normal;
    text-align: right;
  }

  .sp-consent-actions--three {
    grid-template-columns: 1fr;
  }
}
