/* Softverno cookie consent */

.cookie-consent-banner {
  position: fixed;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  z-index: 10050;
  max-width: 42rem;
  margin: 0 auto;
  padding: 1.25rem 1.35rem;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 1.25rem;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.18);
  transform: translateY(120%);
  opacity: 0;
  visibility: hidden;
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.28s ease, visibility 0.28s;
}

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

html.dark .cookie-consent-banner {
  background: #0f172a;
  border-color: #1f2937;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
  color: #e2e8f0;
}

.cookie-consent-banner__title {
  margin: 0 0 0.4rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: #0f172a;
}

html.dark .cookie-consent-banner__title {
  color: #f8fafc;
}

.cookie-consent-banner__text {
  margin: 0 0 1rem;
  font-size: 0.875rem;
  line-height: 1.55;
  color: #64748b;
}

html.dark .cookie-consent-banner__text {
  color: #94a3b8;
}

.cookie-consent-banner__text a {
  color: #059669;
  text-decoration: underline;
}

.cookie-consent-banner__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.cookie-consent-banner__actions .btn {
  flex: 1 1 auto;
  min-width: 8rem;
  justify-content: center;
}

.cookie-consent-overlay {
  position: fixed;
  inset: 0;
  z-index: 10060;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(4px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.cookie-consent-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

.cookie-consent-modal {
  width: min(520px, 100%);
  max-height: min(88vh, 720px);
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 1.25rem;
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.28);
  overflow: hidden;
  transform: translateY(12px) scale(0.98);
  transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}

.cookie-consent-overlay.is-open .cookie-consent-modal {
  transform: translateY(0) scale(1);
}

html.dark .cookie-consent-modal {
  background: #0f172a;
  color: #e2e8f0;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.55);
}

.cookie-consent-modal__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid #e2e8f0;
}

html.dark .cookie-consent-modal__header {
  border-bottom-color: #1f2937;
}

.cookie-consent-modal__header h2 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  color: #0f172a;
}

html.dark .cookie-consent-modal__header h2 {
  color: #f8fafc;
}

.cookie-consent-modal__header p {
  margin: 0.35rem 0 0;
  font-size: 0.8rem;
  color: #64748b;
}

.cookie-consent-modal__close {
  flex-shrink: 0;
  width: 2.25rem;
  height: 2.25rem;
  border: 0;
  border-radius: 9999px;
  background: #f1f5f9;
  color: #475569;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

html.dark .cookie-consent-modal__close {
  background: #1e293b;
  color: #cbd5e1;
}

.cookie-consent-modal__body {
  padding: 1rem 1.5rem 0.5rem;
  overflow-y: auto;
}

.cookie-consent-category {
  padding: 0.9rem 0;
  border-bottom: 1px solid #f1f5f9;
}

html.dark .cookie-consent-category {
  border-bottom-color: #1e293b;
}

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

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

.cookie-consent-category__name {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: #0f172a;
}

html.dark .cookie-consent-category__name {
  color: #f8fafc;
}

.cookie-consent-category__desc {
  margin: 0.35rem 0 0;
  font-size: 0.8rem;
  line-height: 1.5;
  color: #64748b;
}

html.dark .cookie-consent-category__desc {
  color: #94a3b8;
}

.cookie-consent-switch {
  position: relative;
  flex-shrink: 0;
  width: 2.75rem;
  height: 1.55rem;
  border-radius: 9999px;
  background: #cbd5e1;
  border: 0;
  cursor: pointer;
  transition: background 0.2s ease;
  padding: 0;
}

.cookie-consent-switch[aria-checked="true"] {
  background: #10b981;
}

.cookie-consent-switch:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.cookie-consent-switch::after {
  content: "";
  position: absolute;
  top: 0.18rem;
  left: 0.18rem;
  width: 1.2rem;
  height: 1.2rem;
  border-radius: 9999px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.25);
  transition: transform 0.2s ease;
}

.cookie-consent-switch[aria-checked="true"]::after {
  transform: translateX(1.15rem);
}

.cookie-consent-modal__footer {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 1rem 1.5rem 1.25rem;
  border-top: 1px solid #e2e8f0;
}

html.dark .cookie-consent-modal__footer {
  border-top-color: #1f2937;
}

.cookie-consent-modal__footer .btn {
  flex: 1 1 auto;
  min-width: 8rem;
  justify-content: center;
}

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

@media (max-width: 480px) {
  .cookie-consent-banner {
    left: 0.75rem;
    right: 0.75rem;
    bottom: 0.75rem;
    padding: 1rem;
  }

  .cookie-consent-banner__actions .btn,
  .cookie-consent-modal__footer .btn {
    flex: 1 1 100%;
  }
}
