@keyframes cookieOverlayFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes cookieModalDropIn {
  from {
    opacity: 0;
    transform: translateY(-28px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.cookie-consent-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0, 0, 0, 0.62);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.cookie-consent-overlay.show {
  display: flex;
  animation: cookieOverlayFadeIn 0.28s ease-out;
}

.cookie-consent-banner {
  width: 100%;
  max-width: 500px;
  padding: 0;
  border-radius: 10px;
  background: #fff;
  border: 1px solid #d5dae6;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.24);
  animation: cookieModalDropIn 0.34s cubic-bezier(0.22, 1, 0.36, 1);
  overflow: hidden;
}

.cookie-pref-modal {
  width: 100%;
  max-width: 620px;
  padding: 0;
  border-radius: 10px;
  background: #fff;
  border: 1px solid #d5dae6;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.24);
  animation: cookieModalDropIn 0.34s cubic-bezier(0.22, 1, 0.36, 1);
  overflow: hidden;
  display: none;
}

.cookie-pref-modal.show { display: block; }

.cookie-consent-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #eaedf4;
  padding: 12px 12px 12px 16px;
}

.cookie-consent-title {
  margin: 0;
  font-size: 24px;
  line-height: 1.1;
  font-weight: 700;
  color: #1f2a44;
}

.cookie-consent-close {
  border: 0;
  background: #ffb520;
  color: #fff;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 700;
  line-height: 0.9;
  cursor: pointer;
  transition: background 0.2s ease;
}

.cookie-consent-close:hover { background: #f3a400; }

.cookie-consent-body { padding: 14px 16px 12px; }

.cookie-consent-body p {
  margin: 0 0 14px;
  color: #404040;
  font-size: 14px;
  line-height: 1.5;
}

.cookie-consent-actions {
  display: flex;
  gap: 10px;
}

.cookie-consent-actions .btn {
  width: 50%;
  min-width: 0;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 600;
  border: 1px solid #5c77d9;
  background: #5c77d9;
  color: #fff;
}

.cookie-consent-actions .btn:hover {
  background: #4d67cc;
  border-color: #4d67cc;
  color: #fff;
}

.cookie-btn-reject {
  background: #5c77d9;
  color: #fff;
  border-color: #5c77d9;
}

.cookie-manage-btn {
  width: 100%;
  margin-top: 10px;
  border: 1px solid #e3e7ef;
  background: #eceff4;
  color: #59606f;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  padding: 9px 12px;
  cursor: pointer;
}

.cookie-manage-btn:hover { background: #e3e8f0; }

.cookie-pref-body { padding: 14px 16px 16px; }

.cookie-pref-heading {
  margin: 0 0 8px;
  font-size: 20px;
  font-weight: 700;
  color: #1f2a44;
}

.cookie-pref-section {
  background: #f1f4f8;
  border: 1px solid #e1e6ee;
  border-radius: 10px;
  padding: 12px 14px;
  margin-top: 12px;
}

.cookie-pref-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.cookie-pref-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cookie-pref-trigger {
  border: 0;
  background: transparent;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 0;
  cursor: pointer;
  color: inherit;
}

.cookie-pref-expand {
  width: 22px;
  height: 22px;
  border: 1px solid #d5dbe6;
  border-radius: 50%;
  background: #e8edf5;
  color: #52607a;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.cookie-pref-chevron {
  width: 8px;
  height: 8px;
  border-right: 2px solid #52607a;
  border-bottom: 2px solid #52607a;
  transform: rotate(45deg);
  margin-top: -2px;
  transition: transform 0.2s ease, margin-top 0.2s ease;
}

.cookie-pref-trigger[aria-expanded="true"] .cookie-pref-chevron {
  transform: rotate(-135deg);
  margin-top: 2px;
}

.cookie-pref-label {
  font-size: 16px;
  font-weight: 600;
  color: #2f3647;
}

.cookie-pref-note {
  font-size: 13px;
  color: #687081;
  white-space: nowrap;
}

.cookie-pref-content {
  margin-top: 10px;
  color: #5f6675;
  font-size: 13px;
  line-height: 1.5;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.24s ease;
}

.cookie-pref-content.show { max-height: 160px; }

.cookie-toggle-switch {
  position: relative;
  width: 46px;
  height: 26px;
  display: inline-block;
}

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

.cookie-toggle-slider {
  position: absolute;
  inset: 0;
  background: #6d7688;
  border-radius: 999px;
  transition: 0.2s;
}

.cookie-toggle-slider::before {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  left: 4px;
  top: 4px;
  background: #fff;
  border-radius: 50%;
  transition: 0.2s;
}

.cookie-toggle-switch input:checked + .cookie-toggle-slider { background: #5c77d9; }
.cookie-toggle-switch input:checked + .cookie-toggle-slider::before { transform: translateX(20px); }

.cookie-pref-actions {
  display: flex;
  gap: 10px;
  padding: 14px 16px;
  border-top: 1px solid #eaedf4;
}

.cookie-pref-actions .btn {
  width: auto;
  min-width: 120px;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 600;
}

.cookie-save-btn {
  margin-left: auto;
  background: #e4e8ef;
  color: #465066;
  border: 1px solid #d0d6e1;
}

.cookie-save-btn:hover {
  background: #d9dee7;
  color: #3a4457;
}

.cookie-consent-links {
  display: flex;
  gap: 18px;
  padding: 10px 16px 12px;
  border-top: 1px solid #eaedf4;
}

.cookie-consent-links a {
  color: #5e6574;
  font-size: 13px;
  text-decoration: none;
}

.cookie-consent-links a:hover {
  color: #3f4654;
  text-decoration: underline;
}

@media (max-width: 576px) {
  .cookie-consent-overlay { padding: 12px; }
  .cookie-consent-banner,
  .cookie-pref-modal { max-width: 94%; }
  .cookie-consent-title { font-size: 22px; }
  .cookie-consent-close {
    width: 32px;
    height: 32px;
    font-size: 20px;
  }
  .cookie-pref-actions { flex-wrap: wrap; }
  .cookie-pref-actions .btn,
  .cookie-save-btn {
    width: 100%;
    margin-left: 0;
  }
}
