/**
 * Central de Atendimento — widget + dropdown header (Ótica Basílio)
 */

.ob-ca-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ── Widget flutuante ── */
.ob-ca-widget {
  position: fixed;
  z-index: 998;
  bottom: var(--ob-ca-d-bottom, 24px);
  right: var(--ob-ca-d-right, 24px);
  left: var(--ob-ca-d-left, auto);
  top: var(--ob-ca-d-top, auto);
  font-family: var(--font-body, Inter, system-ui, sans-serif);
}

@media (max-width: 768px) {
  .ob-ca-widget {
    bottom: var(--ob-ca-m-bottom, 16px);
    right: var(--ob-ca-m-right, 16px);
    left: var(--ob-ca-m-left, auto);
    top: var(--ob-ca-m-top, auto);
  }
}

.ob-ca-widget__launcher {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  background: linear-gradient(145deg, #2FE077 0%, #25D366 100%);
  box-shadow: 0 6px 24px rgba(37, 211, 102, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s;
}

.ob-ca-widget__launcher:hover {
  transform: scale(1.06);
  box-shadow: 0 8px 28px rgba(37, 211, 102, 0.55);
}

.ob-ca-widget__launcher-icon {
  width: 28px;
  height: 28px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347m-5.421 7.403h-.004a9.87 9.87 0 01-5.031-1.378l-.361-.214-3.741.982.998-3.648-.235-.374a9.86 9.86 0 01-1.51-5.26c.001-5.45 4.436-9.884 9.888-9.884 2.64 0 5.122 1.03 6.988 2.898a9.825 9.825 0 012.893 6.994c-.003 5.45-4.437 9.884-9.885 9.884m8.413-18.297A11.815 11.815 0 0012.05 0C5.495 0 .16 5.335.157 11.892c0 2.096.547 4.142 1.588 5.945L.057 24l6.305-1.654a11.882 11.882 0 005.683 1.448h.005c6.554 0 11.89-5.335 11.893-11.893a11.821 11.821 0 00-3.48-8.413z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.ob-ca-widget__panel {
  position: absolute;
  bottom: calc(100% + 14px);
  right: 0;
  width: min(340px, calc(100vw - 2rem));
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(18, 18, 18, 0.15), 0 0 0 1px rgba(237, 44, 51, 0.08);
  overflow: hidden;
  animation: ob-ca-panel-in 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes ob-ca-panel-in {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.ob-ca-widget.is-panel-open .ob-ca-widget__launcher {
  box-shadow: 0 4px 16px rgba(37, 211, 102, 0.35);
}

.ob-ca-widget__head {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1.15rem 1rem 1rem;
  background: linear-gradient(135deg, #f5f3ee 0%, #fff 100%);
  border-bottom: 1px solid #e8e4dc;
}

.ob-ca-widget__head-icon {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: 12px;
  background: linear-gradient(145deg, #ed2c33 0%, #d41f26 100%);
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M20 2H4c-1.1 0-2 .9-2 2v18l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm0 14H6l-2 2V4h16v12z'/%3E%3C/svg%3E") center / 22px 22px no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M20 2H4c-1.1 0-2 .9-2 2v18l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm0 14H6l-2 2V4h16v12z'/%3E%3C/svg%3E") center / 22px 22px no-repeat;
}

.ob-ca-widget__head-text { flex: 1; min-width: 0; }

.ob-ca-widget__title {
  margin: 0;
  font-family: var(--font-display, Georgia, serif);
  font-size: 1.2rem;
  font-weight: 600;
  color: #121212;
  line-height: 1.25;
}

.ob-ca-widget__subtitle {
  margin: 0.25rem 0 0;
  font-size: 0.85rem;
  color: #6b6560;
  line-height: 1.4;
}

.ob-ca-widget__close {
  background: none;
  border: none;
  font-size: 1.5rem;
  line-height: 1;
  color: #6b6560;
  cursor: pointer;
  padding: 0.15rem;
  border-radius: 8px;
  transition: background 0.2s, color 0.2s;
}

.ob-ca-widget__close:hover {
  background: rgba(237, 44, 51, 0.08);
  color: #ed2c33;
}

.ob-ca-widget__body {
  padding: 1rem;
  max-height: min(70vh, 420px);
  overflow-y: auto;
}

.ob-ca-widget__empty {
  margin: 0;
  font-size: 0.9rem;
  color: #6b6560;
  text-align: center;
  padding: 1rem;
}

.ob-ca-card {
  display: flex;
  gap: 0.85rem;
  padding: 0.85rem;
  border-radius: 16px;
  border: 1px solid #e8e4dc;
  margin-bottom: 0.65rem;
  background: #fffdfb;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.ob-ca-card:last-of-type { margin-bottom: 0; }

.ob-ca-card:hover {
  border-color: rgba(237, 44, 51, 0.25);
  box-shadow: 0 8px 24px rgba(18, 18, 18, 0.06);
}

.ob-ca-card__photo {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  object-fit: cover;
  flex-shrink: 0;
}

.ob-ca-card__photo--placeholder {
  background: linear-gradient(135deg, #bad87533 0%, #ed2c3322 100%);
}

.ob-ca-card__info { flex: 1; min-width: 0; }

.ob-ca-card__name {
  margin: 0;
  font-weight: 600;
  font-size: 0.95rem;
  color: #121212;
}

.ob-ca-card__meta {
  margin: 0.15rem 0 0.5rem;
  font-size: 0.8rem;
  color: #6b6560;
}

.ob-ca-card__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.45rem 1rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #fff;
  background: linear-gradient(135deg, #25d366 0%, #1ebe5d 100%);
  border-radius: 999px;
  transition: transform 0.2s, box-shadow 0.2s;
}

.ob-ca-card__btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(37, 211, 102, 0.35);
}

.ob-ca-widget__email {
  margin: 0.75rem 0 0;
  text-align: center;
  font-size: 0.9rem;
}

.ob-ca-widget__email a {
  color: #ed2c33;
  font-weight: 500;
}

.ob-ca-widget__hours {
  margin-top: 0.85rem;
  padding-top: 0.85rem;
  border-top: 1px solid #e8e4dc;
  font-size: 0.78rem;
  color: #6b6560;
  line-height: 1.5;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

/* ── Header dropdown ── */
.ob-ca-header {
  position: relative;
  flex-shrink: 0;
  z-index: 105;
}

.ob-ca-header__trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 0.9rem;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-light, #6b6560);
  background: rgba(237, 44, 51, 0.06);
  border: 1px solid rgba(237, 44, 51, 0.15);
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.25s, color 0.25s, border-color 0.25s;
}

.ob-ca-header__trigger:hover,
.ob-ca-header.is-open .ob-ca-header__trigger {
  background: rgba(237, 44, 51, 0.12);
  color: #ed2c33;
  border-color: rgba(237, 44, 51, 0.28);
}

.ob-ca-header__trigger-icon {
  width: 16px;
  height: 16px;
  background: currentColor;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M20 2H4c-1.1 0-2 .9-2 2v18l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2z'/%3E%3C/svg%3E") center / contain no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M20 2H4c-1.1 0-2 .9-2 2v18l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.ob-ca-header__trigger-label { white-space: nowrap; }

/* padding-top = “ponte” invisível: o cursor não sai do painel ao ir do botão aos links (evita fechar no hover) */
.ob-ca-header__panel {
  position: absolute;
  top: 100%;
  right: 0;
  left: auto;
  padding-top: 10px;
  margin: 0;
  width: min(320px, calc(100vw - 1.25rem));
  max-width: calc(100vw - 1.25rem);
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
  z-index: 10050;
  animation: ob-ca-panel-in 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.ob-ca-header__inner {
  padding: 1rem 1.1rem;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 16px 48px rgba(18, 18, 18, 0.12), 0 0 0 1px rgba(237, 44, 51, 0.08);
}

.ob-ca-header-wa-item + .ob-ca-header-wa-item {
  margin-top: 0.85rem;
  padding-top: 0.85rem;
  border-top: 1px solid #e8e4dc;
}

.ob-ca-header-section { margin-bottom: 1rem; }
.ob-ca-header-section:last-child { margin-bottom: 0; }

.ob-ca-header-section__title {
  margin: 0 0 0.5rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #ed2c33;
}

.ob-ca-header-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.ob-ca-header-att-photo {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  object-fit: cover;
  flex-shrink: 0;
}

.ob-ca-header-row__icon {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: 10px;
  background: #f5f3ee;
}

.ob-ca-header-row__icon--wa {
  background: rgba(37, 211, 102, 0.15) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%2325D366'%3E%3Cpath d='M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347m-5.421 7.403h-.004a9.87 9.87 0 01-5.031-1.378l-.361-.214-3.741.982.998-3.648-.235-.374a9.86 9.86 0 01-1.51-5.26c.001-5.45 4.436-9.884 9.888-9.884 2.64 0 5.122 1.03 6.988 2.898a9.825 9.825 0 012.893 6.994c-.003 5.45-4.437 9.884-9.885 9.884m8.413-18.297A11.815 11.815 0 0012.05 0C5.495 0 .16 5.335.157 11.892c0 2.096.547 4.142 1.588 5.945L.057 24l6.305-1.654a11.882 11.882 0 005.683 1.448h.005c6.554 0 11.89-5.335 11.893-11.893a11.821 11.821 0 00-3.48-8.413z'/%3E%3C/svg%3E") center / 22px 22px no-repeat;
}

.ob-ca-header-row__icon--mail {
  background: rgba(237, 44, 51, 0.1) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ED2C33' stroke-width='2'%3E%3Cpath d='M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z'/%3E%3Cpolyline points='22,6 12,13 2,6'/%3E%3C/svg%3E") center / 20px 20px no-repeat;
}

.ob-ca-header-row__icon--clock {
  background: rgba(186, 216, 117, 0.35) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233B3C3C' stroke-width='2'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpolyline points='12 6 12 12 16 14'/%3E%3C/svg%3E") center / 20px 20px no-repeat;
}

.ob-ca-header-row__text { flex: 1; min-width: 0; font-size: 0.88rem; }

.ob-ca-header-wa-num {
  display: block;
  font-weight: 600;
  color: #121212;
  font-variant-numeric: tabular-nums;
}

.ob-ca-header-wa-sub {
  display: block;
  font-size: 0.8rem;
  color: #6b6560;
  margin-top: 0.15rem;
}

.ob-ca-header-mail {
  color: #ed2c33;
  font-weight: 500;
  word-break: break-all;
}

.ob-ca-header-row__text--hours {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  color: #3b3c3c;
}

.ob-ca-header-empty {
  margin: 0;
  font-size: 0.85rem;
  color: #6b6560;
}

@media (max-width: 768px) {
  .ob-ca-header__trigger-label { display: none; }
  .ob-ca-header__trigger { padding: 0.5rem 0.65rem; }
}
