/* ==========================================================================
   STUDIO BRANDS VIEW — MULTI-BRAND SOCIAL PROFILE CARDS (CONSISTENT DESKTOP & MOBILE)
   ========================================================================== */

.brands-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 1rem;
  width: 100%;
  align-items: stretch;
}

.brands-cards-grid.single-brand-grid {
  max-width: 520px;
  margin: 0 auto;
  grid-template-columns: 1fr;
}

.brand-social-profile-card {
  --bsp-accent: #60a5fa;
  display: flex;
  flex-direction: column;
  width: 100%;
  background: rgba(15, 23, 42, 0.84);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.36);
}

.bsp-header-banner {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 1;
  background: linear-gradient(135deg, #0b1120 0%, #1e293b 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.bsp-header-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.bsp-header-fallback {
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 75% 30%, rgba(96, 165, 250, 0.25), transparent 60%),
              linear-gradient(135deg, #090d16 0%, #172554 100%);
}

.bsp-header-overlay-actions {
  position: absolute;
  top: 0.65rem;
  right: 0.7rem;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.bsp-edit-btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 0.36rem;
  padding: 0.36rem 0.72rem;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(7, 11, 20, 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #f8fafc;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.bsp-edit-btn:hover {
  background: rgba(30, 41, 59, 0.94);
  border-color: var(--bsp-accent);
  transform: translateY(-1px);
}

.bsp-body {
  padding: 0 1rem 1rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  flex: 1;
}

.bsp-avatar-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.65rem;
  margin-top: -18px;
  position: relative;
  z-index: 3;
}

.bsp-avatar-cluster {
  position: relative;
  display: inline-flex;
  align-items: flex-end;
  flex-shrink: 0;
}

.bsp-pfp-wrap {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  border: 3px solid #0b0f19;
  background: #070b14;
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.bsp-pfp-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.bsp-pfp-fallback {
  font-size: 1.15rem;
  font-weight: 800;
  color: #f8fafc;
}

.bsp-icon-badge {
  position: absolute;
  right: -3px;
  bottom: 0;
  width: 24px;
  height: 24px;
  border-radius: 7px;
  border: 2px solid #0b0f19;
  background: #070b14;
  overflow: hidden;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.45);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.bsp-icon-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.bsp-shared-pill {
  display: inline-flex;
  align-items: center;
  font-size: 0.62rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.24rem 0.56rem;
  border-radius: 9999px;
  background: color-mix(in srgb, var(--bsp-accent, #60a5fa) 16%, transparent);
  border: 1px solid color-mix(in srgb, var(--bsp-accent, #60a5fa) 42%, transparent);
  color: #f8fafc;
  cursor: pointer;
  white-space: nowrap;
}

.bsp-identity-head {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.bsp-name-line {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.bsp-name-left {
  display: flex;
  align-items: baseline;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.bsp-proper-name {
  margin: 0;
  font-family: 'Outfit', sans-serif;
  font-size: 1.22rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.01em;
  cursor: pointer;
}

.bsp-handle-btn {
  appearance: none;
  background: none;
  border: none;
  padding: 0;
  font-size: 0.82rem;
  font-weight: 600;
  color: #94a3b8;
  cursor: pointer;
}

.bsp-handle-btn:hover {
  color: #e2e8f0;
  text-decoration: underline;
}

.bsp-meta-line {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.bsp-meta-chip {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.68rem;
  font-weight: 600;
  color: #cbd5e1;
  background: rgba(7, 11, 20, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0.2rem 0.52rem;
  border-radius: 9999px;
  cursor: pointer;
}

.bsp-meta-chip:hover {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.24);
}

.bsp-referral-chip {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-weight: 700;
  background: rgba(30, 41, 59, 0.75);
  border-color: rgba(148, 163, 184, 0.25);
  color: #e2e8f0;
}

.bsp-kalshi-chip {
  background: rgba(16, 185, 129, 0.14);
  border-color: rgba(52, 211, 153, 0.38);
  color: #6ee7b7;
}

.bsp-kalshi-chip:hover {
  background: rgba(16, 185, 129, 0.24);
  border-color: rgba(52, 211, 153, 0.6);
  color: #a7f3d0;
}

.bsp-domain-chip {
  font-size: 0.66rem;
  font-weight: 600;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  color: #94a3b8;
  background: rgba(7, 11, 20, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0.2rem 0.5rem;
  border-radius: 9999px;
}

.bsp-bio-text {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.42;
  color: #cbd5e1;
  cursor: pointer;
}

.bsp-section-label {
  font-size: 0.62rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.bsp-social-pills {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.35rem;
}

.bsp-social-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: 8px;
  background: rgba(7, 11, 20, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.09);
  overflow: hidden;
  min-width: 0;
}

.bsp-social-pill:hover {
  border-color: rgba(255, 255, 255, 0.22);
}

.bsp-social-pill-main {
  appearance: none;
  background: none;
  border: none;
  display: flex;
  align-items: center;
  gap: 0.26rem;
  padding: 0.3rem 0.4rem;
  cursor: pointer;
  color: #f8fafc;
  font-family: inherit;
  min-width: 0;
  flex: 1;
}

.bsp-social-pill-platform {
  font-size: 0.56rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: #94a3b8;
  flex-shrink: 0;
}

.bsp-social-pill-handle {
  font-size: 0.66rem;
  font-weight: 600;
  color: #f1f5f9;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bsp-social-pill-open {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.3rem 0.34rem;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  color: #94a3b8;
  font-size: 0.64rem;
  text-decoration: none;
  flex-shrink: 0;
}

.bsp-social-pill-open:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.bsp-media-col {
  display: flex;
  flex-direction: column;
  gap: 0.42rem;
  margin-top: auto;
}

.bsp-banner-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 10px;
  overflow: hidden;
  background: #070b14;
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
}

.bsp-banner-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.bsp-banner-empty {
  font-size: 0.7rem;
  color: #64748b;
}

.bsp-banner-tag {
  position: absolute;
  top: 0.4rem;
  right: 0.45rem;
  font-size: 0.58rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.14rem 0.42rem;
  border-radius: 5px;
  background: rgba(7, 11, 20, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #cbd5e1;
}

.bsp-assets-trigger-btn {
  appearance: none;
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #f8fafc;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.12s ease;
}

.bsp-assets-trigger-btn:hover {
  background: rgba(30, 41, 59, 0.95);
  border-color: var(--bsp-primary, rgba(245, 158, 11, 0.55));
}

.bsp-assets-trigger-btn:active {
  transform: translateY(1px);
}

.bsp-assets-trigger-btn svg {
  color: var(--bsp-primary, #f59e0b);
  flex-shrink: 0;
}

.brand-assets-dialog.studio-dialog {
  width: min(720px, 94vw);
  max-width: 720px;
  max-height: 90vh;
  padding: 1.15rem 1.25rem;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #0f172a;
  color: #f8fafc;
  box-shadow: 0 28px 65px rgba(2, 6, 23, 0.82);
}

.brand-assets-dialog::backdrop {
  background: rgba(2, 6, 23, 0.76);
  backdrop-filter: blur(5px);
}

.bam-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding-bottom: 0.85rem;
  margin-bottom: 0.85rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.bam-header-left {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.bam-brand-icon {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: #070b14;
  flex-shrink: 0;
}

.bam-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
  color: #f8fafc;
}

.bam-subtitle {
  margin: 0.12rem 0 0;
  font-size: 0.74rem;
  color: #94a3b8;
}

.bam-assets-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.bam-asset-card {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding: 0.75rem;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.09);
}

.bam-asset-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.bam-asset-title-wrap {
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
}

.bam-asset-name {
  font-size: 0.78rem;
  font-weight: 700;
  color: #f8fafc;
}

.bam-asset-spec {
  font-size: 0.62rem;
  font-weight: 600;
  color: #94a3b8;
}

.bam-asset-meta {
  font-size: 0.62rem;
  font-weight: 600;
  color: #64748b;
  white-space: nowrap;
}

.bam-asset-meta.is-set {
  color: #34d399;
}

.bam-asset-preview {
  position: relative;
  height: 112px;
  border-radius: 9px;
  overflow: hidden;
  background: #070b14;
  border: 1px solid rgba(255, 255, 255, 0.07);
  display: flex;
  align-items: center;
  justify-content: center;
}

.bam-asset-preview.bam-aspect-header {
  height: 128px;
}

.bam-asset-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.bam-aspect-square .bam-asset-img {
  object-fit: contain;
  padding: 0.35rem;
}

.bam-asset-empty {
  font-size: 0.7rem;
  color: #64748b;
}

.bam-asset-actions {
  display: flex;
  gap: 0.4rem;
}

.bam-action-btn {
  flex: 1;
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.32rem;
  padding: 0.42rem 0.5rem;
  border-radius: 7px;
  background: rgba(30, 41, 59, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #e2e8f0;
  font-size: 0.7rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.bam-action-btn:hover {
  background: rgba(51, 65, 85, 0.98);
  color: #ffffff;
}

.bam-download-btn {
  background: rgba(96, 165, 250, 0.16);
  border-color: var(--bam-accent, rgba(96, 165, 250, 0.45));
  color: #f8fafc;
}

.bam-download-btn:hover {
  background: rgba(96, 165, 250, 0.28);
}

.bam-action-btn.is-disabled {
  opacity: 0.4;
  pointer-events: none;
}

@media (max-width: 640px) {
  .bam-assets-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 420px) {
  .brands-cards-grid {
    grid-template-columns: 1fr;
  }
}
