/**
 * EPHARO AI 2060 PLATFORM
 * Privacy consent banner and privacy center
 * Version: 2026-07-25.1
 */

:root {
  --epharo-privacy-bg: #ffffff;
  --epharo-privacy-surface: #f5f7f3;
  --epharo-privacy-text: #162018;
  --epharo-privacy-muted: #5d685f;
  --epharo-privacy-border: rgba(22, 32, 24, 0.14);
  --epharo-privacy-primary: #275f3d;
  --epharo-privacy-primary-hover: #1f4e31;
  --epharo-privacy-focus: #79a98a;
  --epharo-privacy-overlay: rgba(10, 18, 13, 0.58);
  --epharo-privacy-danger: #a23a32;
  --epharo-privacy-radius: 18px;
  --epharo-privacy-shadow:
    0 22px 70px rgba(11, 24, 15, 0.22),
    0 4px 16px rgba(11, 24, 15, 0.12);
}

/*
 * Základný kontajner modulu
 */

#epharo-consent-root {
  position: relative;
  z-index: 2147483000;
  color: var(--epharo-privacy-text);
  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    Helvetica,
    Arial,
    sans-serif;
  font-size: 16px;
  line-height: 1.5;
  text-align: left;
}

#epharo-consent-root *,
#epharo-consent-root *::before,
#epharo-consent-root *::after {
  box-sizing: border-box;
}

#epharo-consent-root button,
#epharo-consent-root input {
  font: inherit;
}

#epharo-consent-root [hidden] {
  display: none !important;
}

/*
 * Overlay
 */

.epharo-consent-overlay {
  position: fixed;
  inset: 0;
  z-index: 2147483001;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 20px;
  background: var(--epharo-privacy-overlay);
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 180ms ease,
    visibility 180ms ease;
}

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

body.epharo-consent-lock {
  overflow: hidden;
}

/*
 * Hlavný banner
 */

.epharo-consent-banner {
  position: relative;
  width: min(1180px, 100%);
  max-height: calc(100vh - 40px);
  overflow: auto;
  padding: 24px;
  border: 1px solid var(--epharo-privacy-border);
  border-radius: var(--epharo-privacy-radius);
  background: var(--epharo-privacy-bg);
  box-shadow: var(--epharo-privacy-shadow);
  transform: translateY(24px);
  transition: transform 180ms ease;
  -webkit-overflow-scrolling: touch;
}

.epharo-consent-overlay.is-visible .epharo-consent-banner {
  transform: translateY(0);
}

.epharo-consent-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
}

.epharo-consent-copy {
  min-width: 0;
}

.epharo-consent-brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 10px;
  color: var(--epharo-privacy-primary);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.epharo-consent-brand-mark {
  width: 11px;
  height: 11px;
  flex: 0 0 11px;
  border-radius: 50%;
  background: var(--epharo-privacy-primary);
  box-shadow: 0 0 0 5px rgba(39, 95, 61, 0.12);
}

.epharo-consent-title {
  margin: 0 0 8px;
  color: var(--epharo-privacy-text);
  font-size: clamp(21px, 2.2vw, 28px);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.epharo-consent-description {
  max-width: 780px;
  margin: 0;
  color: var(--epharo-privacy-muted);
  font-size: 15px;
  line-height: 1.65;
}

.epharo-consent-description a,
.epharo-consent-legal-links a {
  color: var(--epharo-privacy-primary);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.epharo-consent-description a:hover,
.epharo-consent-legal-links a:hover {
  color: var(--epharo-privacy-primary-hover);
}

.epharo-consent-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  width: min(450px, 100%);
}

/*
 * Tlačidlá
 */

.epharo-consent-button {
  min-height: 46px;
  padding: 11px 18px;
  border: 1px solid transparent;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
  transition:
    background-color 150ms ease,
    border-color 150ms ease,
    color 150ms ease,
    transform 150ms ease,
    box-shadow 150ms ease;
}

.epharo-consent-button:hover {
  transform: translateY(-1px);
}

.epharo-consent-button:active {
  transform: translateY(0);
}

.epharo-consent-button:focus-visible,
.epharo-consent-close:focus-visible,
.epharo-consent-switch input:focus-visible + .epharo-consent-slider {
  outline: 3px solid var(--epharo-privacy-focus);
  outline-offset: 3px;
}

.epharo-consent-button:disabled {
  cursor: wait;
  opacity: 0.65;
  transform: none;
}

.epharo-consent-button--primary {
  color: #ffffff;
  background: var(--epharo-privacy-primary);
  border-color: var(--epharo-privacy-primary);
}

.epharo-consent-button--primary:hover {
  background: var(--epharo-privacy-primary-hover);
  border-color: var(--epharo-privacy-primary-hover);
}

.epharo-consent-button--secondary {
  color: var(--epharo-privacy-text);
  background: #ffffff;
  border-color: var(--epharo-privacy-border);
}

.epharo-consent-button--secondary:hover {
  background: var(--epharo-privacy-surface);
  border-color: rgba(22, 32, 24, 0.26);
}

.epharo-consent-button--ghost {
  color: var(--epharo-privacy-primary);
  background: transparent;
  border-color: transparent;
}

.epharo-consent-button--ghost:hover {
  background: rgba(39, 95, 61, 0.08);
}

/*
 * Detailné nastavenia
 */

.epharo-consent-settings {
  position: fixed;
  inset: 0;
  z-index: 2147483002;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: var(--epharo-privacy-overlay);
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 180ms ease,
    visibility 180ms ease;
}

.epharo-consent-settings.is-visible {
  opacity: 1;
  visibility: visible;
}

.epharo-consent-dialog {
  width: min(720px, 100%);
  max-height: calc(100vh - 40px);
  overflow: auto;
  border: 1px solid var(--epharo-privacy-border);
  border-radius: var(--epharo-privacy-radius);
  background: var(--epharo-privacy-bg);
  box-shadow: var(--epharo-privacy-shadow);
  transform: scale(0.98) translateY(12px);
  transition: transform 180ms ease;
  -webkit-overflow-scrolling: touch;
}

.epharo-consent-settings.is-visible .epharo-consent-dialog {
  transform: scale(1) translateY(0);
}

.epharo-consent-dialog-header {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 24px;
  border-bottom: 1px solid var(--epharo-privacy-border);
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(12px);
}

.epharo-consent-dialog-title {
  margin: 0 0 5px;
  color: var(--epharo-privacy-text);
  font-size: 24px;
  font-weight: 800;
  line-height: 1.2;
}

.epharo-consent-dialog-description {
  margin: 0;
  color: var(--epharo-privacy-muted);
  font-size: 14px;
}

.epharo-consent-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  padding: 0;
  border: 1px solid var(--epharo-privacy-border);
  border-radius: 50%;
  color: var(--epharo-privacy-text);
  background: #ffffff;
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
}

.epharo-consent-close:hover {
  background: var(--epharo-privacy-surface);
}

.epharo-consent-dialog-body {
  padding: 8px 24px 24px;
}

/*
 * Consent kategórie
 */

.epharo-consent-category {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px;
  align-items: center;
  padding: 20px 0;
  border-bottom: 1px solid var(--epharo-privacy-border);
}

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

.epharo-consent-category-copy {
  min-width: 0;
}

.epharo-consent-category-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  margin-bottom: 5px;
}

.epharo-consent-category-title {
  margin: 0;
  color: var(--epharo-privacy-text);
  font-size: 17px;
  font-weight: 800;
  line-height: 1.3;
}

.epharo-consent-required-label {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 9px;
  border-radius: 999px;
  color: var(--epharo-privacy-primary);
  background: rgba(39, 95, 61, 0.1);
  font-size: 12px;
  font-weight: 800;
}

.epharo-consent-category-description {
  margin: 0;
  color: var(--epharo-privacy-muted);
  font-size: 14px;
  line-height: 1.55;
}

/*
 * Prepínače
 */

.epharo-consent-switch {
  position: relative;
  display: inline-flex;
  width: 52px;
  height: 30px;
  flex: 0 0 52px;
}

.epharo-consent-switch input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
}

.epharo-consent-slider {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(22, 32, 24, 0.2);
  border-radius: 999px;
  background: #c8ceca;
  cursor: pointer;
  transition:
    background-color 160ms ease,
    border-color 160ms ease;
}

.epharo-consent-slider::before {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.22);
  content: "";
  transition: transform 160ms ease;
}

.epharo-consent-switch input:checked + .epharo-consent-slider {
  border-color: var(--epharo-privacy-primary);
  background: var(--epharo-privacy-primary);
}

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

.epharo-consent-switch input:disabled + .epharo-consent-slider {
  cursor: not-allowed;
  opacity: 0.78;
}

/*
 * Pätička detailného okna
 */

.epharo-consent-dialog-footer {
  position: sticky;
  bottom: 0;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  padding: 18px 24px;
  border-top: 1px solid var(--epharo-privacy-border);
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(12px);
}

.epharo-consent-dialog-footer .epharo-consent-button {
  min-width: 140px;
}

/*
 * Právne odkazy a stavové správy
 */

.epharo-consent-legal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 14px;
  font-size: 13px;
}

.epharo-consent-status {
  display: none;
  width: 100%;
  margin: 14px 0 0;
  padding: 11px 13px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
}

.epharo-consent-status.is-visible {
  display: block;
}

.epharo-consent-status--error {
  color: var(--epharo-privacy-danger);
  background: rgba(162, 58, 50, 0.1);
}

.epharo-consent-status--success {
  color: var(--epharo-privacy-primary);
  background: rgba(39, 95, 61, 0.1);
}

/*
 * Plávajúce tlačidlo na opätovné otvorenie nastavení
 */

.epharo-privacy-trigger {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 2147482999;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  min-height: 48px;
  padding: 10px 14px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 999px;
  color: #ffffff;
  background: var(--epharo-privacy-primary);
  box-shadow: 0 8px 25px rgba(11, 24, 15, 0.25);
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
}

.epharo-privacy-trigger:hover {
  background: var(--epharo-privacy-primary-hover);
}

.epharo-privacy-trigger:focus-visible {
  outline: 3px solid var(--epharo-privacy-focus);
  outline-offset: 3px;
}

/*
 * Responzívne správanie
 */

@media (max-width: 860px) {
  .epharo-consent-layout {
    grid-template-columns: 1fr;
  }

  .epharo-consent-actions {
    justify-content: flex-start;
    width: 100%;
  }

  .epharo-consent-actions .epharo-consent-button {
    flex: 1 1 180px;
  }
}

@media (max-width: 600px) {
  .epharo-consent-overlay,
  .epharo-consent-settings {
    padding: 10px;
  }

  .epharo-consent-banner,
  .epharo-consent-dialog {
    max-height: calc(100vh - 20px);
    border-radius: 15px;
  }

  .epharo-consent-banner {
    padding: 19px;
  }

  .epharo-consent-title {
    font-size: 22px;
  }

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

  .epharo-consent-actions .epharo-consent-button {
    width: 100%;
  }

  .epharo-consent-dialog-header {
    padding: 19px;
  }

  .epharo-consent-dialog-title {
    font-size: 21px;
  }

  .epharo-consent-dialog-body {
    padding: 5px 19px 19px;
  }

  .epharo-consent-category {
    gap: 14px;
    padding: 18px 0;
  }

  .epharo-consent-dialog-footer {
    display: grid;
    grid-template-columns: 1fr;
    padding: 15px 19px;
  }

  .epharo-consent-dialog-footer .epharo-consent-button {
    width: 100%;
  }

  .epharo-privacy-trigger {
    right: 12px;
    bottom: 12px;
  }
}

/*
 * Zníženie animácií podľa nastavenia používateľa
 */

@media (prefers-reduced-motion: reduce) {
  .epharo-consent-overlay,
  .epharo-consent-banner,
  .epharo-consent-settings,
  .epharo-consent-dialog,
  .epharo-consent-button,
  .epharo-consent-slider,
  .epharo-consent-slider::before {
    scroll-behavior: auto;
    transition: none;
  }
}

/*
 * Tlačová verzia
 */

@media print {
  #epharo-consent-root,
  .epharo-privacy-trigger {
    display: none !important;
  }
}