/* === Cookie consent – alap === */

.cookie-consent-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 999;
  background: var(--bg-soft);
  border-top: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 -8px 20px rgba(15, 23, 42, 0.18);
  padding: 0.85rem 1rem;
  font-size: 0.9rem;
}

.cookie-consent-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: center;
  text-align: center;
}

.cookie-consent-text {
  line-height: 1.45;
  color: var(--muted, #6b7280);
  max-width: 900px;
}

.cookie-consent-link {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cookie-consent-link:hover {
  text-decoration: none;
}

.cookie-consent-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}

.cookie-consent-actions button {
  font-size: 0.85rem;
}

/* === Cookie gombok === */

.btn-cookie-primary,
.btn-cookie-secondary,
.btn-cookie-outline {
  border-radius: 999px;
  padding: 0.45rem 0.9rem;
  border: 1px solid transparent;
  cursor: pointer;
  font-weight: 500;
  line-height: 1.2;
  white-space: nowrap;
}

/* Fő (pink) gomb – "Minden sütit elfogadok", "Mentés" */
.btn-cookie-primary {
  background: var(--accent);
  border-color: var(--accent-strong, #db2777);
  color: #ffffff;
}

.btn-cookie-primary:hover {
  background: var(--accent-strong, #db2777);
}

/* Másodlagos – "Csak szükséges sütik" */
.btn-cookie-secondary {
  background: #e5e7eb;
  border-color: #d1d5db;
  color: #111827;
}

.btn-cookie-secondary:hover {
  background: #d1d5db;
}

/* Outline – "Beállítások" */
.btn-cookie-outline {
  background: transparent;
  border-color: var(--accent);
  color: var(--accent);
}

.btn-cookie-outline:hover {
  background: rgba(236, 72, 153, 0.08);
}

/* === Cookie beállítási panel (modal) === */

.cookie-consent-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none; /* JS kezeli */
}

.cookie-consent-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
}

.cookie-consent-panel {
  position: relative;
  max-width: 640px;
  margin: 3rem auto;
  background: var(--bg-soft);
  border-radius: 1.25rem;
  padding: 1.5rem 1.75rem;
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.35);
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 4rem);
  overflow: hidden;
}

@media (max-width: 640px) {
  .cookie-consent-panel {
    margin: 2rem 1rem;
    padding: 1.25rem 1.25rem;
    max-height: calc(100vh - 3rem);
  }
}

.cookie-consent-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.cookie-consent-header h2 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text, #0f172a);
}

.cookie-consent-close {
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  padding: 0.25rem;
  border-radius: 999px;
}

.cookie-consent-close:hover {
  background: rgba(15, 23, 42, 0.06);
}

.cookie-consent-body {
  font-size: 0.9rem;
  color: var(--muted, #6b7280);
  overflow-y: auto;
  padding-right: 0.25rem;
  margin-top: 0.5rem;
}

.cookie-consent-body > p {
  margin-bottom: 0.75rem;
}

/* Kategória kártyák */

.cookie-category {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.7rem 0.9rem;
  border-radius: 0.9rem;
  border: 1px solid rgba(148, 163, 184, 0.45);
  background: rgba(248, 250, 252, 0.9);
  margin-bottom: 0.6rem;
}

.cookie-category-text h3 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text, #0f172a);
  margin-bottom: 0.15rem;
}

.cookie-category-text p {
  font-size: 0.85rem;
  color: var(--muted, #6b7280);
}

.cookie-category-toggle {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-width: 90px;
}

/* "Mindig engedélyezve" jelvény */

.cookie-pill {
  display: inline-block;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.08);
  color: #047857;
  font-size: 0.75rem;
  font-weight: 500;
}

/* Kapcsoló (switch) */

.cookie-switch {
  position: relative;
  display: inline-block;
  width: 42px;
  height: 22px;
}

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

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

.cookie-slider::before {
  content: "";
  position: absolute;
  height: 16px;
  width: 16px;
  left: 3px;
  top: 3px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.25);
  transition: 0.2s ease;
}

.cookie-switch input:checked + .cookie-slider {
  background: var(--accent);
}

.cookie-switch input:checked + .cookie-slider::before {
  transform: translateX(18px);
}

/* Modal lábléc */

.cookie-consent-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.6rem;
  margin-top: 0.8rem;
  padding-top: 0.6rem;
  border-top: 1px solid rgba(148, 163, 184, 0.4);
}

.cookie-consent-footer .btn-cookie-secondary,
.cookie-consent-footer .btn-cookie-primary {
  font-size: 0.85rem;
}

/* Mobilos finomhangolás – a gombok egymás alatt, szépen elrendezve */
@media (max-width: 640px) {
  .cookie-consent-banner {
    padding: 0.9rem 0.8rem 1.1rem;
  }

  .cookie-consent-inner {
    align-items: stretch;
    text-align: center;
  }

  .cookie-consent-text {
    font-size: 0.85rem;
  }

  .cookie-consent-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .cookie-consent-actions button {
    width: 100%;
    justify-content: center;
    text-align: center;
  }
}
