/* ==========================================================================
   ZOZ.GR — Cookie Consent & Privacy Preferences Stylesheet
   Minimalist Hellenic Design System (Greek Blue #0066cc, White, Slate)
   GDPR & ePrivacy Directive Compliant (Bilingual Greek & English)
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Floating Cookie Reopen Trigger (Bottom Left)
   -------------------------------------------------------------------------- */
.zoz-cookie-trigger {
  position: fixed;
  bottom: 22px;
  left: 22px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--white, #ffffff);
  border: 1px solid var(--grey-border, #e2e8f0);
  box-shadow: 0 4px 14px rgba(12, 30, 51, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 998;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  color: var(--text-title, #0c1e33);
  padding: 0;
}

.zoz-cookie-trigger:hover,
.zoz-cookie-trigger:focus-visible {
  transform: scale(1.08);
  border-color: var(--greek-blue, #0066cc);
  box-shadow: 0 6px 18px rgba(0, 102, 204, 0.18);
  outline: none;
}

.zoz-cookie-trigger svg {
  width: 22px;
  height: 22px;
  fill: var(--greek-blue, #0066cc);
  transition: transform 0.2s ease;
}

.zoz-cookie-trigger:hover svg {
  transform: rotate(15deg);
}

/* Tooltip for Trigger */
.zoz-cookie-trigger::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 54px;
  white-space: nowrap;
  background: #0c1e33;
  color: #ffffff;
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 500;
  pointer-events: none;
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.zoz-cookie-trigger:hover::after,
.zoz-cookie-trigger:focus-visible::after {
  opacity: 1;
  transform: translateX(0);
}

/* --------------------------------------------------------------------------
   2. Cookie Consent Bottom Banner
   -------------------------------------------------------------------------- */
.zoz-cookie-banner {
  position: fixed;
  bottom: 24px;
  right: 24px;
  max-width: 460px;
  width: calc(100% - 48px);
  background: #ffffff;
  border: 1px solid var(--grey-border, #e2e8f0);
  border-top: 3px solid var(--greek-blue, #0066cc);
  border-radius: 14px;
  box-shadow: 0 16px 36px rgba(12, 30, 51, 0.12), 0 2px 8px rgba(12, 30, 51, 0.04);
  z-index: 10000;
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
  transition: opacity 0.28s cubic-bezier(0.16, 1, 0.3, 1), transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: var(--font-family, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif);
}

.zoz-cookie-banner.active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.zoz-cookie-banner-inner {
  padding: 20px 22px 18px;
}

/* Header with Icon, Title and Language Switcher */
.zoz-cookie-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.zoz-cookie-title-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.zoz-cookie-icon {
  width: 22px;
  height: 22px;
  fill: var(--greek-blue, #0066cc);
  flex-shrink: 0;
}

.zoz-cookie-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-title, #0c1e33);
  margin: 0;
  line-height: 1.3;
}

/* Bilingual Language Switcher (EL | EN) */
.zoz-lang-switcher {
  display: inline-flex;
  align-items: center;
  background: var(--grey-bg, #f8fafc);
  border: 1px solid var(--grey-border, #e2e8f0);
  border-radius: 20px;
  padding: 2px;
  gap: 2px;
}

.zoz-lang-btn {
  background: transparent;
  border: none;
  border-radius: 16px;
  padding: 3px 10px;
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  color: var(--text-muted, #64748b);
  transition: background 0.15s ease, color 0.15s ease;
  line-height: 1.2;
}

.zoz-lang-btn:hover {
  color: var(--text-title, #0c1e33);
}

.zoz-lang-btn.active {
  background: var(--greek-blue, #0066cc);
  color: #ffffff;
  box-shadow: 0 1px 3px rgba(0, 102, 204, 0.3);
}

/* Banner Description Text */
.zoz-cookie-text {
  font-size: 0.88rem;
  color: var(--text-body, #334155);
  line-height: 1.55;
  margin: 0 0 16px;
}

/* Banner Action Buttons */
.zoz-cookie-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.zoz-cookie-actions-primary {
  display: flex;
  gap: 8px;
  width: 100%;
}

.zoz-cookie-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 16px;
  font-size: 0.88rem;
  font-weight: 600;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.18s ease;
  text-decoration: none;
  font-family: inherit;
}

.zoz-cookie-btn:focus-visible {
  outline: 2px solid var(--greek-blue, #0066cc);
  outline-offset: 2px;
}

.zoz-cookie-btn-accept {
  flex: 1;
  background: var(--greek-blue, #0066cc);
  color: #ffffff;
}

.zoz-cookie-btn-accept:hover {
  background: var(--greek-blue-hover, #0052a3);
  box-shadow: 0 2px 8px rgba(0, 102, 204, 0.25);
}

.zoz-cookie-btn-reject {
  flex: 1;
  background: #ffffff;
  border-color: var(--grey-border, #e2e8f0);
  color: var(--text-title, #0c1e33);
}

.zoz-cookie-btn-reject:hover {
  border-color: #cbd5e1;
  background: var(--grey-bg, #f8fafc);
}

.zoz-cookie-btn-customize {
  background: transparent;
  border: 1px dashed var(--grey-border, #e2e8f0);
  color: var(--greek-blue, #0066cc);
  font-size: 0.82rem;
  padding: 7px 12px;
  width: 100%;
}

.zoz-cookie-btn-customize:hover {
  border-color: var(--greek-blue, #0066cc);
  background: var(--greek-blue-light, #f0f6fc);
}

/* --------------------------------------------------------------------------
   3. Detailed Preferences Modal
   -------------------------------------------------------------------------- */
.zoz-cookie-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(12, 30, 51, 0.52);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 10001;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
  font-family: var(--font-family, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif);
}

.zoz-cookie-modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.zoz-cookie-modal-card {
  background: #ffffff;
  border-radius: 16px;
  border: 1px solid var(--grey-border, #e2e8f0);
  box-shadow: 0 20px 48px rgba(12, 30, 51, 0.2), 0 4px 12px rgba(12, 30, 51, 0.06);
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: scale(0.96) translateY(12px);
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.zoz-cookie-modal-overlay.active .zoz-cookie-modal-card {
  transform: scale(1) translateY(0);
}

/* Modal Header */
.zoz-cookie-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  border-bottom: 1px solid var(--grey-border, #e2e8f0);
  background: #ffffff;
}

.zoz-cookie-modal-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.zoz-cookie-modal-close {
  background: transparent;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-muted, #64748b);
  font-size: 1.5rem;
  line-height: 1;
  transition: background 0.15s ease, color 0.15s ease;
  padding: 0;
}

.zoz-cookie-modal-close:hover {
  background: var(--grey-bg, #f8fafc);
  color: var(--text-title, #0c1e33);
}

/* Modal Scrollable Body */
.zoz-cookie-modal-body {
  padding: 20px 24px;
  overflow-y: auto;
  flex: 1;
}

.zoz-cookie-modal-desc {
  font-size: 0.9rem;
  color: var(--text-muted, #64748b);
  line-height: 1.55;
  margin-bottom: 18px;
}

/* Category List */
.zoz-cookie-categories {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.zoz-cookie-category-item {
  border: 1px solid var(--grey-border, #e2e8f0);
  border-radius: 12px;
  padding: 16px;
  background: var(--grey-bg, #f8fafc);
  transition: border-color 0.18s ease, background 0.18s ease;
}

.zoz-cookie-category-item:hover {
  border-color: #cbd5e1;
  background: #ffffff;
}

.zoz-cookie-cat-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.zoz-cookie-cat-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.zoz-cookie-cat-title {
  font-size: 0.96rem;
  font-weight: 700;
  color: var(--text-title, #0c1e33);
  margin: 0;
}

.zoz-cookie-badge-locked {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 12px;
  background: var(--greek-blue-light, #f0f6fc);
  color: var(--greek-blue, #0066cc);
  font-size: 0.72rem;
  font-weight: 700;
  border: 1px solid var(--greek-blue-border, #d0e2f5);
}

.zoz-cookie-cat-desc {
  font-size: 0.84rem;
  color: var(--text-body, #334155);
  line-height: 1.5;
  margin: 0;
}

/* Custom Accessible Toggle Switch */
.zoz-toggle-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

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

.zoz-toggle-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: #cbd5e1;
  transition: 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 24px;
}

.zoz-toggle-slider::before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: #ffffff;
  transition: 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.zoz-toggle-switch input:checked + .zoz-toggle-slider {
  background-color: var(--greek-blue, #0066cc);
}

.zoz-toggle-switch input:checked + .zoz-toggle-slider::before {
  transform: translateX(20px);
}

.zoz-toggle-switch input:disabled + .zoz-toggle-slider {
  opacity: 0.65;
  cursor: not-allowed;
  background-color: var(--greek-blue, #0066cc);
}

.zoz-toggle-switch input:focus-visible + .zoz-toggle-slider {
  box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.3);
}

/* Modal Footer Actions */
.zoz-cookie-modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 24px;
  border-top: 1px solid var(--grey-border, #e2e8f0);
  background: var(--grey-bg, #f8fafc);
  flex-wrap: wrap;
}

/* --------------------------------------------------------------------------
   4. Feedback Notification Toast
   -------------------------------------------------------------------------- */
.zoz-cookie-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(30px);
  background: #0c1e33;
  color: #ffffff;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 0.86rem;
  font-weight: 500;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  z-index: 10002;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.zoz-cookie-toast.active {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.zoz-cookie-toast-icon {
  fill: #34d399;
  width: 16px;
  height: 16px;
}

/* Footer Cookie Trigger Link */
.footer-bottom-legal {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.footer-legal-link {
  color: var(--text-muted, #64748b);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.15s ease;
}

.footer-legal-link:hover {
  color: var(--greek-blue, #0066cc);
  text-decoration: underline;
}

.footer-dot-sep {
  color: var(--text-subtle, #94a3b8);
}

/* --------------------------------------------------------------------------
   5. Mobile Responsiveness
   -------------------------------------------------------------------------- */
@media (max-width: 640px) {
  .zoz-cookie-banner {
    bottom: 0;
    right: 0;
    left: 0;
    width: 100%;
    max-width: 100%;
    border-radius: 16px 16px 0 0;
    border-left: none;
    border-right: none;
    border-bottom: none;
    padding-bottom: env(safe-area-inset-bottom, 12px);
  }

  .zoz-cookie-banner-inner {
    padding: 16px 18px;
  }

  .zoz-cookie-trigger {
    bottom: 16px;
    left: 16px;
    width: 40px;
    height: 40px;
  }

  .zoz-cookie-trigger::after {
    display: none; /* Hide hover tooltip on touch devices */
  }

  .zoz-cookie-modal-card {
    max-height: 94vh;
    border-radius: 14px;
  }

  .zoz-cookie-modal-header {
    padding: 14px 18px;
  }

  .zoz-cookie-modal-body {
    padding: 16px 18px;
  }

  .zoz-cookie-modal-footer {
    padding: 12px 18px;
    flex-direction: column-reverse;
  }

  .zoz-cookie-modal-footer .zoz-cookie-btn {
    width: 100%;
  }

  .zoz-cookie-actions-primary {
    flex-direction: column;
  }
}
