/* Smart Contact Bar – sticky, due livelli; coerenza con variabili sito */

.smart-contact-bar {
  display: none;
}

.smart-contact-bar__icon {
  display: inline-flex;
  width: 1.1em;
  height: 1.1em;
  align-items: center;
  justify-content: center;
}

.smart-contact-bar__icon .lab-icon {
  width: 1em;
  height: 1em;
}

.smart-contact-bar__btn {
  appearance: none;
  border: 0;
  background: transparent;
  cursor: pointer;
  font: inherit;
  color: inherit;
  text-decoration: none;
  box-sizing: border-box;
}

.smart-contact-bar__btn:focus-visible {
  outline: 2px solid var(--brand, #b30059);
  outline-offset: 2px;
}

/* Pannello orari (dialog nativo) */
.smart-hours {
  border: none;
  padding: 0;
  max-width: min(22rem, calc(100vw - 2rem));
  border-radius: 12px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.16);
  color: var(--text, #2e2e2e);
  background: #fff;
}

.smart-hours::backdrop {
  background: rgba(30, 30, 30, 0.35);
}

.smart-hours__panel {
  padding: 1.15rem 1.2rem 1.25rem;
  text-align: left;
}

.smart-hours__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.smart-hours__title {
  margin: 0;
  font-family: var(--font-heading, Georgia, serif);
  font-weight: 600;
  font-size: 1.25rem;
  line-height: 1.25;
  text-decoration: none;
}

.smart-hours__title::after {
  display: none;
}

.smart-hours__close {
  appearance: none;
  border: 1px solid var(--border, #dcdcdc);
  background: #fff;
  color: var(--text, #2e2e2e);
  width: 2.5rem;
  height: 2.5rem;
  min-width: 44px;
  min-height: 44px;
  border-radius: 999px;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
}

.smart-hours__close:focus-visible {
  outline: 2px solid var(--brand, #b30059);
  outline-offset: 2px;
}

.smart-hours__list {
  margin: 0 0 0.75rem;
  padding-left: 1.1rem;
  font-family: var(--font-body, Arial, Helvetica, sans-serif);
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--text, #2e2e2e);
}

.smart-hours__list li + li {
  margin-top: 0.35rem;
}

.smart-hours__note {
  margin: 0 0 0.85rem;
  font-size: 0.85rem;
  line-height: 1.45;
  color: var(--text-muted, #626262);
}

.smart-hours__cta {
  margin: 0;
}

.smart-hours__link {
  color: var(--brand, #b30059);
  font-weight: 600;
  font-size: 0.92rem;
  text-decoration: underline;
}

.smart-hours__link:focus-visible {
  outline: 2px solid var(--brand, #b30059);
  outline-offset: 2px;
}

@media (max-width: 768px) {
  .smart-contact-bar {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    position: fixed;
    left: 0.5rem;
    right: 0.5rem;
    bottom: calc(0.45rem + env(safe-area-inset-bottom, 0px));
    z-index: 998;
    background: rgba(255, 255, 255, 0.91);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border: 0;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 16px;
    box-shadow: 0 1px 10px rgba(0, 0, 0, 0.05);
    padding: 0.18rem 0.25rem;
  }

  .smart-contact-bar__primary,
  .smart-contact-bar__secondary {
    display: flex;
    width: 100%;
    gap: 0.15rem;
  }

  .smart-contact-bar__btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.08rem;
    min-height: 40px;
    padding: 0.2rem 0.15rem;
    border-radius: 12px;
    font-family: var(--font-sans, var(--font-body, Arial, Helvetica, sans-serif));
    font-weight: 500;
    color: #333;
    text-align: center;
    transition: background-color 0.15s ease;
  }

  .smart-contact-bar__btn--primary {
    font-size: calc(0.75rem + 1px);
    min-height: 40px;
  }

  .smart-contact-bar__btn--primary .smart-contact-bar__icon {
    color: var(--brand, #b30059);
  }

  .smart-contact-bar__btn--whatsapp .smart-contact-bar__icon {
    color: #13753a;
  }

  .smart-contact-bar__btn--secondary {
    font-size: calc(0.68rem + 1px);
    font-weight: 500;
    min-height: 32px;
  }

  .smart-contact-bar__btn--secondary .smart-contact-bar__icon {
    width: 0.95em;
    height: 0.95em;
    color: #333;
  }

  .smart-contact-bar__btn:hover {
    background: rgba(179, 0, 89, 0.05);
  }

  .smart-contact-bar__btn--whatsapp:hover {
    background: rgba(19, 117, 58, 0.06);
  }

  /* CookieYes revisit: sempre sopra la barra sospesa */
  body:not(.page-policy) .cky-btn-revisit-wrapper {
    bottom: calc(5.55rem + env(safe-area-inset-bottom, 0px)) !important;
    left: 0.55rem !important;
    width: 40px !important;
    height: 40px !important;
  }

  body:not(.page-policy) .cky-btn-revisit-wrapper .cky-btn-revisit,
  body:not(.page-policy) .cky-btn-revisit-wrapper .cky-btn-revisit img {
    width: 22px !important;
    height: 22px !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .smart-contact-bar__btn {
    transition: none;
  }
}
