/* ============================================
   myopia.eurooptica.md — Custom styles
   Used for: cookie consent banner + honeypot
   Brand colors: navy-950 #0A1628, coral-600 #D4513E
   ============================================ */

/* ===== A11y: skip to main content link ===== */
.skip-link {
  position: absolute;
  top: -100%;
  left: 16px;
  z-index: 9999;
  padding: 8px 16px;
  background: #0A1628;
  color: #fff;
  font-weight: 600;
  border-radius: 0 0 8px 8px;
  text-decoration: none;
  transition: top 0.2s ease;
}
.skip-link:focus {
  top: 0;
  outline: 2px solid #D4513E;
  outline-offset: 2px;
}

/* ===== A11y: respect reduced-motion preferences ===== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ===== Cookie consent banner (eo-consent.js) ===== */
#eocb {
  position: fixed; inset: 0; z-index: 9999;
  font-family: 'Onest', sans-serif;
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s ease;
}
#eocb.eocb-show { opacity: 1; pointer-events: auto; }
.eocb-overlay { position: absolute; inset: 0; background: rgba(10,22,40,0.6); }
.eocb-box {
  position: absolute; left: 50%; bottom: 24px;
  transform: translateX(-50%) translateY(20px);
  width: calc(100% - 32px); max-width: 560px;
  background: #fff; border-radius: 16px;
  box-shadow: 0 20px 50px rgba(10,22,40,0.25), 0 4px 12px rgba(10,22,40,0.1);
  padding: 24px;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  max-height: calc(100vh - 48px); overflow-y: auto;
}
#eocb.eocb-show .eocb-box { transform: translateX(-50%) translateY(0); }
.eocb-screen { display: block; }
.eocb-title  { font-size: 18px; font-weight: 700; color: #0A1628; margin-bottom: 8px; }
.eocb-text   { font-size: 14px; line-height: 1.5; color: #475569; margin-bottom: 16px; }
.eocb-privacy { color: #D4513E; text-decoration: underline; }
.eocb-privacy:hover { color: #B73E2C; }

.eocb-actions {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px;
}
.eocb-btn-accept {
  background: #D4513E; color: #fff; border: none;
  padding: 12px 20px; border-radius: 10px;
  font-weight: 600; font-size: 14px; cursor: pointer;
  font-family: inherit; transition: background 0.2s ease;
}
.eocb-btn-accept:hover { background: #B73E2C; }
.eocb-btn-accept:focus-visible { outline: 2px solid #D4513E; outline-offset: 2px; }
.eocb-link-subtle {
  background: none; border: none; color: #475569;
  font-size: 14px; font-weight: 500; cursor: pointer;
  padding: 8px 4px; font-family: inherit; text-decoration: underline;
}
.eocb-link-subtle:hover { color: #0A1628; }
.eocb-s2-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.eocb-back   {
  background: none; border: none; color: #D4513E;
  font-weight: 600; font-size: 14px; cursor: pointer;
  padding: 4px 0; font-family: inherit;
}
.eocb-back:hover { color: #B73E2C; }
.eocb-s2-title { font-weight: 700; font-size: 16px; color: #0A1628; }

.eocb-cats { display: flex; flex-direction: column; gap: 12px; margin-bottom: 20px; }
.eocb-cat {
  display: flex; align-items: flex-start;
  justify-content: space-between; gap: 12px;
  padding: 12px; background: #F0F4F8; border: 1px solid #DAE2ED;
  border-radius: 10px; cursor: pointer;
}
.eocb-cat-info { display: flex; flex-direction: column; gap: 4px; flex: 1; min-width: 0; }
.eocb-cat-info strong { font-size: 14px; color: #0A1628; font-weight: 600; }
.eocb-cat-desc        { font-size: 12px; color: #475569; line-height: 1.4; }
.eocb-toggle          {
  flex-shrink: 0; width: 18px; height: 18px;
  margin-top: 2px; cursor: pointer; accent-color: #D4513E;
}
.eocb-toggle:disabled { cursor: not-allowed; opacity: 0.6; }

#eocb-footer { text-align: center; padding: 16px 16px 24px; }
#eocb-footer-btn {
  background: transparent;
  color: inherit;
  opacity: 0.55;
  border: none;
  border-bottom: 1px dashed currentColor;
  border-radius: 0;
  padding: 2px 0;
  font-size: 12px; font-weight: 500; cursor: pointer;
  font-family: 'Onest', sans-serif;
  transition: opacity 0.15s ease;
}
#eocb-footer-btn:hover { opacity: 1; background: transparent; }

@media (max-width: 480px) {
  .eocb-box { padding: 20px 18px; bottom: 12px; }
  .eocb-actions { flex-direction: column; align-items: stretch; }
  .eocb-btn-accept, .eocb-link-subtle { width: 100%; text-align: center; }
}

/* ===== Honeypot — visible to bots, invisible to humans ===== */
.eo-honeypot {
  position: absolute !important;
  left: -10000px !important; top: auto !important;
  width: 1px !important; height: 1px !important;
  overflow: hidden !important;
}
