/* Badges */
.status-badge {
  display: inline-block;
  padding: 0.25em 0.65em;
  border-radius: 999px;
  font-size: 0.85em;
  font-weight: 600;
  line-height: 1.3;
}

.xplore-open-now.status-badge.open {
  background: #e6f6ea;
  color: #0a7a32;
}

.xplore-closed-now.status-badge.closed {
  background: #fdecea;
  color: #b42318;
}

/* Icon indicator */
.xplore-open-now-icon {
  font-size: 0.85em;
  line-height: 1;
}

.xplore-open-now-icon.open {
  color: #0a7a32;
}

.xplore-open-now-icon.closed {
  color: #b42318;
}

/* Weekly hours */
.xp-weekly-hours ul {
  list-style: none;
  margin: 0.5em 0 0;
  padding: 0;
}

.xp-weekly-hours li {
  margin: 0.2em 0;
}

.xp-weekly-hours li.xp-hours-today {
  font-weight: 700;
}

.xp-hours-closed,
.xp-hours-invalid {
  color: #888;
}

.xp-hours-247 {
  color: #0a7a32;
}

/* Filter toggle */
#open-now-toggle {
  cursor: pointer;
}

#open-now-toggle.active {
  background: #0a7a32;
  color: #fff;
  border-color: #0a7a32;
}

/* Dashboard override notices */
.xplore-dashboard-notices {
  margin: 0 0 1em;
}

.xp-dashboard-notice {
  padding: 0.75em 1em;
  margin: 0 0 0.5em;
  border-radius: 6px;
  border-left: 4px solid #2271b1;
  background: #f0f6fc;
}

.xp-dashboard-notice.notice-success {
  border-left-color: #0a7a32;
  background: #e6f6ea;
}

.xp-dashboard-notice.notice-warning {
  border-left-color: #dba617;
  background: #fcf9e8;
}

.xp-dashboard-notice.notice-info {
  border-left-color: #2271b1;
  background: #f0f6fc;
}

.xp-dashboard-notice.notice-error {
  border-left-color: #b42318;
  background: #fdecea;
}

/* Business hours panel ([business_hours]) */
.xp-business-hours {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: #1a1a1a;
  width: 100%;
  max-width: none;
  box-sizing: border-box;
  padding: 1.15rem 1.25rem 1.2rem;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #fff;
}

.xp-bh-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  text-align: left;
  font: inherit;
}

.xp-bh-header[role="button"] {
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
}

.xp-bh-header:not([role="button"]) {
  cursor: default;
}

.xp-bh-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #003d33;
  line-height: 1.25;
}

.xp-bh-chevron {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 0.75rem;
  flex-shrink: 0;
  color: #1a1a1a;
  font-size: 1.35rem;
  line-height: 1;
  transition: transform 0.2s ease;
}

.xp-bh-chevron::before {
  content: "\25BE"; /* ▾ fallback if span text stripped */
}

.xp-bh-chevron:not(:empty)::before {
  content: none; /* prefer real text node when present */
}

/* collapsed = down; expanded = rotate to point up */
.xp-business-hours:not(.is-collapsed) .xp-bh-chevron {
  transform: rotate(180deg);
}

.xp-bh-status {
  margin: 0.45rem 0 1rem;
  font-size: 1.15rem;
  font-weight: 500;
  line-height: 1.35;
}

.xp-business-hours.is-closed .xp-bh-status {
  color: #8b1e4d;
}

.xp-business-hours.is-open .xp-bh-status {
  color: #0a7a32;
}

.xp-bh-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.xp-business-hours.is-collapsed .xp-bh-row.xp-bh-other {
  display: none;
}

.xp-bh-row {
  display: grid;
  grid-template-columns: minmax(7.5rem, auto) 1fr;
  column-gap: 1.5rem;
  align-items: start;
}

.xp-bh-day {
  font-weight: 700;
  color: #003d33;
  font-size: 1.15rem;
  line-height: 1.5;
}

.xp-bh-times {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.xp-bh-closed-day {
  color: #888;
}

/* Open-now badge weekly tip (multi-slot; hover whole badge; high z-index) */
.status-badge {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
  cursor: help;
}

.xp-badge-tip {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.xp-badge-tip-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.1em;
  height: 1.1em;
  border-radius: 50%;
  border: 1px solid currentColor;
  font-size: 0.75em;
  font-weight: 700;
  line-height: 1;
  opacity: 0.85;
}

.xp-badge-tip-panel {
  display: none;
  position: absolute;
  left: 0;
  top: calc(100% + 0.45rem);
  z-index: 99999;
  min-width: 14rem;
  padding: 0.65rem 0.8rem;
  border-radius: 8px;
  background: #2b2b2b;
  color: #fff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
  white-space: nowrap;
  pointer-events: none;
}

/* Show tip when hovering/focusing the whole badge (not only the ?) */
.status-badge:hover .xp-badge-tip-panel,
.status-badge:focus-within .xp-badge-tip-panel,
.xp-badge-tip:hover .xp-badge-tip-panel,
.xp-badge-tip:focus .xp-badge-tip-panel,
.xp-badge-tip:focus-within .xp-badge-tip-panel {
  display: block;
}

.xp-badge-tip-row {
  display: grid;
  grid-template-columns: 2.5rem 1fr;
  column-gap: 0.65rem;
  align-items: start;
  margin: 0.2rem 0;
}

.xp-badge-tip-day {
  font-weight: 600;
}

.xp-badge-tip-hours {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}
