/* ===================================================================
   File: business-listing-options-bar.css
   Description: Top listing options toolbar, Basic/Premium preview toggle, upgrade CTA, and feature-list popover.
   Notes:
   - Load after business-listing-shared-core.css and before Basic/Premium renderer CSS.
   - This file intentionally keeps the toggle and upgrade button separated.
   =================================================================== */

/* =========================
   TOOLBAR SHELL
   ========================= */

.ll-listing-options-bar {
  margin: 0 0 18px 0;
}

.ll-listing-options-bar__main {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 48px;
}

.ll-listing-options-bar__toggle,
.ll-listing-options-bar__side {
  flex: 0 0 auto;
}

.ll-listing-options-bar__toggle {
  width: min(340px, 100%);
}

.ll-listing-options-bar__side {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  min-width: 260px;
}

.ll-listing-options-bar__label {
  margin: 0 0 6px 0;
  color: #0f172a;
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* =========================
   BASIC / PREMIUM TOGGLE
   ========================= */

.ll-owner-toggle-label {
  margin: 0 0 0.55rem;
  color: #475569;
  font-size: 1.5rem;
}

.ll-tier-preview-toggle {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  padding: 6px;
  background: #e2e8f0;
  border: 1px solid #cbd5e1;
  border-radius: 16px;
  overflow: hidden;
}

.ll-tier-preview-toggle__button {
  display: flex;
  min-width: 0;
  min-height: 64px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
  padding: 0.7rem 0.75rem;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #334155;
  cursor: pointer;
  text-align: center;
}

.ll-tier-preview-toggle__button:first-child {
  border-radius: 12px 0 0 12px;
}

.ll-tier-preview-toggle__button:last-child {
  border-radius: 0 12px 12px 0;
}

.ll-tier-preview-toggle__button[aria-selected="true"] {
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
}

.ll-tier-preview-toggle__view-label {
  display: block;
  margin-bottom: 2px;
  color: #64748b;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1;
}

.ll-tier-preview-toggle__title {
  font-weight: 800;
  line-height: 1.1;
}

.ll-tier-preview-toggle__plan-note {
  font-size: 1.2rem;
  line-height: 1.15;
  color: #64748b;
}

.ll-tier-preview-toggle__button.is-current-plan .ll-tier-preview-toggle__plan-note {
  color: #0f766e;
}

/* =========================
   UPGRADE CTA + FEATURE LIST
   ========================= */

.ll-listing-options-bar__upgrade .ll-btn {
  width: 260px;
  max-width: 100%;
  min-height: 44px;
  justify-content: center;
  border-radius: 6px;
  padding: 10px 14px;
  font-size: 1.5rem;
  background: red;
}

.ll-listing-options-bar__features {
  position: relative;
  width: 100%;
  text-align: center;
}

.ll-listing-options-bar__features > summary {
  list-style: none;
  cursor: pointer;
  font-size: 1.5rem;
}

.ll-listing-options-bar__features > summary::-webkit-details-marker {
  display: none;
}

.ll-listing-options-bar__features-toggle {
  display: inline-block;
  width: auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ll-color-primary, #0073aa);
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.35;
  text-align: center;
  text-decoration: underline;
  cursor: pointer;
  box-shadow: none;
}

.ll-listing-options-bar__features-toggle:hover {
  color: var(--ll-color-primary-hover, #005f8d);
}

.ll-listing-options-bar__features-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 50%;
  z-index: 20;
  width: min(420px, 90vw);
  transform: translateX(50%);
  background: #ffffff;
  border: 1px solid #dbe4ee;
  border-radius: 14px;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.16);
  padding: 14px;
  text-align: left;
}

.ll-listing-options-feature-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ll-owner-tier-card {
  background: #ffffff;
  border: 1px solid #dbe4ee;
  border-radius: 14px;
  padding: 14px;
}

.ll-owner-tier-card__title {
  margin: 0 0 0.75rem;
  color: #0f172a;
  font-size: 1.8rem;
  line-height: 1.25;
}

/* =========================
   PREVIEW PANELS
   ========================= */

.ll-owner-inline-upgrade[hidden],
.ll-owner-tier-feature-panels[hidden],
.ll-tier-preview-panel[hidden] {
  display: none !important;
}

.ll-owner-inline-upgrade:not([hidden]),
.ll-tier-preview-panel.is-active {
  display: block;
}

.ll-owner-tier-summary,
.ll-owner-tier-feature-panels,
.ll-owner-upgrade-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ll-owner-inline-upgrade .ll-btn,
.ll-owner-upgrade-actions .ll-btn {
  width: 100%;
  justify-content: center;
}

/* =========================
   RESPONSIVE
   ========================= */

@media (max-width: 980px) {
  .ll-listing-options-bar__main {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
  }

  .ll-listing-options-bar__toggle,
  .ll-listing-options-bar__side {
    width: 100%;
    min-width: 0;
  }

  .ll-listing-options-bar__upgrade .ll-btn {
    width: 100%;
  }

  .ll-listing-options-bar__features-panel {
    position: static;
    width: auto;
    transform: none;
    margin-top: 10px;
  }
}

@media (max-width: 640px) {
  .ll-tier-preview-toggle {
    grid-template-columns: 1fr;
  }

  .ll-tier-preview-toggle__button:first-child,
  .ll-tier-preview-toggle__button:last-child {
    border-radius: 12px;
  }
}
