/* Task #1439818: Browse/search pages — purchase sidebar
 * Owns: sticky right-column sidebar on /settlements, /search, /category pages
 * Does NOT own: settlement cards, filter bar, hero, or any other page section
 */

/* ── Layout wrapper: main grid + sidebar ──────────────── */
.sr-browse-layout {
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.25rem;
  box-sizing: border-box;
}

.sr-browse-main {
  flex: 1 1 0;
  min-width: 0;
}

.sr-purchase-sidebar {
  flex: 0 0 256px;
  width: 256px;
  position: sticky;
  top: 1rem;
  max-height: calc(100vh - 2rem);
  overflow-y: auto;
  scrollbar-width: none;
}
.sr-purchase-sidebar::-webkit-scrollbar { display: none; }

/* ── Sidebar card shell ───────────────────────────────── */
.sr-sb-card {
  background: #fff;
  border: 1.5px solid #e8eaed;
  border-radius: 14px;
  padding: 1.1rem 1rem;
  margin-bottom: 0.75rem;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

/* ── Hero pack card ───────────────────────────────────── */
.sr-sb-hero {
  border-color: rgba(0,179,125,0.35);
  background: linear-gradient(160deg, #f0fdf7 0%, #fff 55%);
}

.sr-sb-label {
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #00875A;
  margin-bottom: 0.45rem;
}

.sr-sb-title {
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: #1d1d1f;
  line-height: 1.3;
  margin-bottom: 0.25rem;
}

.sr-sb-sub {
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 0.78rem;
  color: #6b7280;
  margin-bottom: 0.85rem;
  line-height: 1.4;
}

/* ── Pack buttons ─────────────────────────────────────── */
.sr-sb-packs {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.sr-sb-pack-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  text-decoration: none;
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  border: 1.5px solid transparent;
  line-height: 1.25;
}

.sr-sb-pack-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(0,179,125,0.18);
}

.sr-sb-pack-hero {
  background: #00B37D;
  color: #fff;
  border-color: #00B37D;
}
.sr-sb-pack-hero:hover { background: #00A070; color: #fff; }

.sr-sb-pack-secondary {
  background: #f0fdf7;
  color: #065f46;
  border-color: rgba(0,179,125,0.3);
}
.sr-sb-pack-secondary:hover { background: #d1fae5; }

.sr-sb-pack-ghost {
  background: #fff;
  color: #374151;
  border-color: #d1d5db;
}
.sr-sb-pack-ghost:hover { background: #f9fafb; }

.sr-sb-badge {
  font-size: 0.68rem;
  font-weight: 700;
  background: rgba(255,255,255,0.25);
  color: inherit;
  border-radius: 4px;
  padding: 0.1rem 0.35rem;
  white-space: nowrap;
  margin-left: 0.35rem;
}
.sr-sb-pack-secondary .sr-sb-badge,
.sr-sb-pack-ghost .sr-sb-badge {
  background: rgba(0,179,125,0.12);
  color: #00875A;
}

/* ── Divider ─────────────────────────────────────────── */
.sr-sb-divider {
  border: none;
  border-top: 1px solid #e8eaed;
  margin: 0.75rem 0;
}

/* ── Pro upsell card ─────────────────────────────────── */
.sr-sb-pro {
  border-color: rgba(0,179,125,0.2);
}

.sr-sb-pro-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #00875A;
  background: #d1fae5;
  border-radius: 100px;
  padding: 0.18rem 0.55rem;
  margin-bottom: 0.5rem;
}

.sr-sb-pro-price {
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 1.25rem;
  font-weight: 800;
  color: #1d1d1f;
  letter-spacing: -0.02em;
  margin-bottom: 0.2rem;
}
.sr-sb-pro-price span {
  font-size: 0.78rem;
  font-weight: 500;
  color: #6b7280;
}

.sr-sb-pro-perks {
  list-style: none;
  padding: 0;
  margin: 0.5rem 0 0.85rem;
}
.sr-sb-pro-perks li {
  font-size: 0.78rem;
  color: #374151;
  padding: 0.18rem 0;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-family: 'DM Sans', system-ui, sans-serif;
}
.sr-sb-pro-perks li::before {
  content: '✓';
  color: #00B37D;
  font-weight: 700;
  font-size: 0.7rem;
  flex-shrink: 0;
}

.sr-sb-pro-btn {
  display: block;
  text-align: center;
  background: #00B37D;
  color: #fff;
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 0.55rem 1rem;
  border-radius: 8px;
  text-decoration: none;
  transition: background 0.15s ease, transform 0.15s ease;
}
.sr-sb-pro-btn:hover {
  background: #00A070;
  color: #fff;
  transform: translateY(-1px);
}

/* ── Priority Alerts card ────────────────────────────── */
.sr-sb-alerts {
  border-color: #e0e7ff;
  background: linear-gradient(160deg, #f5f3ff 0%, #fff 55%);
}

.sr-sb-alerts-icon {
  font-size: 1.1rem;
  margin-bottom: 0.4rem;
}

.sr-sb-alerts-btn {
  display: block;
  text-align: center;
  background: #4f46e5;
  color: #fff;
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  text-decoration: none;
  margin-top: 0.7rem;
  transition: background 0.15s ease, transform 0.15s ease;
}
.sr-sb-alerts-btn:hover {
  background: #4338ca;
  color: #fff;
  transform: translateY(-1px);
}

/* ── Mobile top bar ──────────────────────────────────── */
.sr-mobile-purchase-bar {
  display: none;
  background: #fff;
  border-bottom: 1.5px solid rgba(0,179,125,0.3);
  padding: 0.6rem 1rem;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.sr-mb-collapsed {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.sr-mb-label {
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  color: #1d1d1f;
  flex: 1;
}

.sr-mb-cta {
  background: #00B37D;
  color: #fff;
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.38rem 0.85rem;
  border-radius: 7px;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
}

.sr-mb-toggle {
  background: none;
  border: none;
  color: #6b7280;
  font-size: 0.75rem;
  cursor: pointer;
  padding: 0.25rem;
  white-space: nowrap;
  font-family: 'DM Sans', system-ui, sans-serif;
}

.sr-mb-expanded {
  display: none;
  padding-top: 0.6rem;
  border-top: 1px solid #e8eaed;
  margin-top: 0.6rem;
}
.sr-mb-expanded.open { display: block; }

.sr-mb-pack-row {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
}

.sr-mb-pack-pill {
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.35rem 0.75rem;
  border-radius: 100px;
  text-decoration: none;
  border: 1.5px solid rgba(0,179,125,0.3);
  color: #065f46;
  background: #f0fdf7;
  white-space: nowrap;
  transition: background 0.15s;
}
.sr-mb-pack-pill:hover { background: #d1fae5; }
.sr-mb-pack-pill.primary {
  background: #00B37D;
  color: #fff;
  border-color: #00B37D;
}
.sr-mb-pack-pill.primary:hover { background: #00A070; }

.sr-mb-pro-link {
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 0.75rem;
  color: #374151;
}
.sr-mb-pro-link a {
  color: #00875A;
  font-weight: 700;
  text-decoration: none;
}

/* Task #1450225 FIX: Ensure .sr-browse-main expands to full width */
.sr-browse-main {
  flex: 1 1 auto !important;
  width: 100% !important;
}

/* ── Responsive ───────────────────────────────────────── */
@media (max-width: 1024px) {
  .sr-purchase-sidebar { display: none; }
  .sr-browse-layout {
    padding: 0;
  }
}

@media (max-width: 1024px) {
  .sr-mobile-purchase-bar { display: block; }
}

/* On mobile the layout is a single column — no flex wrapper needed */
@media (max-width: 1024px) {
  .sr-browse-layout {
    display: block;
  }
  .sr-browse-main {
    min-width: 0;
    width: 100%;
  }
}
