﻿:root {
  --cookie-fab-size: 52px;
}

.cookie-consent-fab {
  position: fixed;
  left: clamp(12px, 2vw, 22px);
  bottom: clamp(14px, 2.2vw, 24px);
  width: var(--cookie-fab-size);
  height: var(--cookie-fab-size);
  border-radius: 999px;
  border: 1px solid rgba(97, 145, 180, 0.42);
  background: linear-gradient(145deg, #071624, #0b1f33);
  box-shadow:
    0 12px 28px rgba(7, 16, 28, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  color: #111111;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 140;
  transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
}

.cookie-consent-fab:hover,
.cookie-consent-fab:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(73, 214, 255, 0.62);
  box-shadow:
    0 14px 30px rgba(7, 16, 28, 0.42),
    0 0 18px rgba(73, 214, 255, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.cookie-consent-fab svg {
  width: 23px;
  height: 23px;
}

[data-theme="light"] .cookie-consent-fab {
  border: 1px solid rgba(116, 160, 192, 0.3);
  background: linear-gradient(145deg, #fcfeff, #eef4fa);
  box-shadow:
    0 10px 26px rgba(5, 14, 24, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.78);
}

[data-theme="light"] .cookie-consent-fab:hover,
[data-theme="light"] .cookie-consent-fab:focus-visible {
  border-color: rgba(73, 214, 255, 0.64);
  box-shadow:
    0 14px 30px rgba(5, 14, 24, 0.3),
    0 0 18px rgba(73, 214, 255, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.84);
}

.cookie-consent-panel {
  position: fixed;
  left: 50%;
  bottom: clamp(18px, 3vw, 30px);
  transform: translate(-50%, 14px);
  width: min(920px, calc(100vw - 34px));
  border-radius: 18px;
  border: 1px solid rgba(117, 188, 226, 0.28);
  background:
    linear-gradient(160deg, rgba(249, 252, 255, 0.97), rgba(236, 244, 252, 0.95));
  color: #16334a;
  box-shadow:
    0 20px 58px rgba(4, 11, 21, 0.34),
    0 0 24px rgba(73, 214, 255, 0.14);
  z-index: 145;
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transition: opacity 0.32s ease, transform 0.32s ease, visibility 0.32s ease;
  overflow: hidden;
}

.cookie-consent-panel.is-open {
  opacity: 1;
  transform: translate(-50%, 0);
  visibility: visible;
  pointer-events: auto;
}

.cookie-consent-main {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.95rem;
  align-items: start;
  padding: 1rem 1.15rem 1.05rem;
}

.cookie-consent-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(150deg, rgba(37, 151, 217, 0.18), rgba(73, 214, 255, 0.14));
  display: grid;
  place-items: center;
  box-shadow: inset 0 0 0 1px rgba(73, 166, 223, 0.25);
  flex-shrink: 0;
}

.cookie-consent-icon svg {
  width: 24px;
  height: 24px;
}

.cookie-consent-content h3 {
  margin: 0;
  font-size: 1.06rem;
  line-height: 1.2;
  color: #0f2f47;
}

.cookie-consent-content p {
  margin: 0.42rem 0 0;
  color: #2f4f65;
  font-size: 0.92rem;
  line-height: 1.55;
  max-width: 72ch;
}

.cookie-consent-link {
  display: inline-flex;
  margin-top: 0.58rem;
  color: #0c76a9;
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
}

.cookie-consent-link:hover,
.cookie-consent-link:focus-visible {
  text-decoration: underline;
}

.cookie-consent-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.56rem;
  margin-top: 0.8rem;
}

.cookie-consent-btn {
  border-radius: 10px;
  border: 1px solid rgba(76, 140, 186, 0.34);
  background: rgba(255, 255, 255, 0.82);
  color: #18415e;
  min-height: 40px;
  padding: 0.52rem 0.82rem;
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.cookie-consent-btn:hover,
.cookie-consent-btn:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(70, 174, 226, 0.55);
  box-shadow: 0 0 14px rgba(73, 214, 255, 0.16);
}

.cookie-consent-btn.primary {
  border-color: rgba(25, 149, 211, 0.66);
  background: linear-gradient(145deg, #58dbff, #23b8e6);
  color: #042132;
}

.cookie-consent-config {
  border-top: 1px solid rgba(84, 148, 186, 0.2);
  padding: 0 1.15rem;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.34s ease, opacity 0.28s ease, padding 0.28s ease;
}

.cookie-consent-panel.is-config-open .cookie-consent-config {
  max-height: 220px;
  opacity: 1;
  padding: 0.8rem 1.15rem 1rem;
}

.cookie-consent-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.8rem;
  align-items: center;
  padding: 0.56rem 0;
  border-bottom: 1px solid rgba(81, 139, 175, 0.16);
}

.cookie-consent-row:last-child {
  border-bottom: 0;
}

.cookie-consent-row h4 {
  margin: 0;
  font-size: 0.88rem;
  color: #123248;
}

.cookie-consent-row p {
  margin: 0.16rem 0 0;
  font-size: 0.78rem;
  color: #48677f;
}

.cookie-toggle {
  width: 46px;
  height: 26px;
  border: 1px solid rgba(84, 138, 173, 0.28);
  border-radius: 999px;
  background: rgba(174, 196, 213, 0.46);
  position: relative;
  transition: background 0.22s ease, border-color 0.22s ease;
}

.cookie-toggle::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 6px rgba(7, 20, 32, 0.18);
  transition: transform 0.22s ease;
}

.cookie-toggle.is-on {
  background: rgba(41, 188, 234, 0.56);
  border-color: rgba(43, 174, 216, 0.62);
}

.cookie-toggle.is-on::after {
  transform: translateX(20px);
}

.cookie-toggle[aria-disabled="true"] {
  opacity: 0.72;
}

@media (max-width: 759px) {
  .cookie-consent-fab {
    --cookie-fab-size: 48px;
    left: 10px;
    bottom: 12px;
  }

  .cookie-consent-panel {
    width: calc(100vw - 18px);
    bottom: 12px;
    border-radius: 14px;
  }

  .cookie-consent-main {
    grid-template-columns: 1fr;
    gap: 0.7rem;
    padding: 0.9rem;
  }

  .cookie-consent-icon {
    width: 40px;
    height: 40px;
  }

  .cookie-consent-actions {
    flex-direction: column;
    gap: 0.48rem;
  }

  .cookie-consent-btn {
    width: 100%;
  }

  .cookie-consent-panel.is-config-open .cookie-consent-config {
    padding: 0.68rem 0.9rem 0.82rem;
  }
}
