/* ===== BROKER COMPARISON — LAYOUT UTILITIES ===== */

/* ===== BROKER COMPARISON — PAGE STYLES ===== */
:root {
  --bc-primary:       #6055cd;
  --bc-primary-light: #eef1ff;
  --bc-primary-dark:  #4a40b5;
  --bc-success:       #22c55e;
  --bc-danger:        #ef4444;
  --bc-border:        #e9ecef;
  --bc-surface:       #ffffff;
  --bc-bg:            #f2f4ff;
  --bc-text:          #1a1a2e;
  --bc-muted:         #6c757d;
  --bc-radius:        12px;
  --bc-shadow-sm:     0 2px 8px rgba(96,85,205,.08);
  --bc-shadow-md:     0 8px 24px rgba(96,85,205,.14);
  --bc-transition:    all .25s cubic-bezier(.4,0,.2,1);
}

/* ---- Page title ---- */
.bc-page-title {
  font-size: clamp(1.2rem, 3vw, 1.6rem);
  font-weight: 700;
  color: var(--bc-text);
  margin-bottom: 1.25rem;
  animation: bc-fadeUp .4s ease both;
}

@keyframes bc-fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes bc-fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes bc-slideUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---- Broker selector bar ---- */
.bc-broker-bar {
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--bc-border);
  border-radius: 16px;
  padding: .875rem 1rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--bc-shadow-sm);
  transition: var(--bc-transition);
  overflow: visible; /* allow dropdown to render outside bounds */
}
.fixed-top .bc-broker-bar {
  /* border-radius: 0;
  border-left: none;
  border-right: none; */
  top: 64px !important;
  border-top: none;
  box-shadow: 0 6px 24px rgba(96,85,205,.15);
  margin-bottom: 0;
}
.fixed-top { top: 70px !important; }

/* ---- Broker row grid ---- */
.bc-broker-row {
  display: grid;
  grid-template-columns: 150px repeat(3, 1fr);
  gap: .75rem;
  align-items: stretch;
  overflow: visible; /* avoid clipping dropdown menu */
}

/* Label / Compare cell */
.bc-label-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .375rem;
  color: var(--bc-primary);
  font-weight: 700;
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .07em;
}
.bc-label-cell img {
  width: 42px;
  height: 42px;
  object-fit: contain;
  opacity: .8;
  transition: transform .3s ease;
}
.bc-label-cell:hover img { transform: scale(1.08); }

/* ---- Broker card ---- */
.bc-broker-card {
  position: relative;
  background: var(--bc-surface);
  border: 1.5px solid var(--bc-border);
  border-radius: var(--bc-radius);
  padding: 1rem .75rem .75rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .5rem;
  text-align: center;
  transition: var(--bc-transition);
  box-shadow: var(--bc-shadow-sm);
  animation: bc-slideUp .35s ease both;
  overflow: visible; /* keep dropdown above other elements */
  z-index: 1; /* ensure we can layer dropdown above sibling cards */
}
.bc-broker-card:nth-of-type(2) { animation-delay: .06s; }
.bc-broker-card:nth-of-type(3) { animation-delay: .12s; }
.bc-broker-card:nth-of-type(4) { animation-delay: .18s; }
.bc-broker-card:hover {
  border-color: var(--bc-primary);
  box-shadow: var(--bc-shadow-md);
  transform: translateY(-3px);
  z-index: 25;
}
.bc-broker-card.bc-empty {
  border-style: dashed;
  background: #fafaff;
  opacity: .7;
}
.bc-broker-card.bc-empty:hover {
  opacity: 1;
  border-color: var(--bc-primary);
  transform: translateY(-2px);
}

/* ---- Broker logo ---- */
.bc-logo {
  width: 54px;
  height: 54px;
  border-radius: 10px;
  border: 1px solid var(--bc-border);
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  background-color: #f8f9fa;
  transition: transform .3s ease;
  flex-shrink: 0;
}

.bc-empty-logo {
  opacity: .35;
  background-image: url(/public/assets/icons/question_circle.png);
}
.bc-broker-card:hover .bc-logo {
  transform: scale(1.1) rotate(-2deg);
}

/* ---- VS badge ---- */
.bc-vs {
  position: absolute;
  right: .1rem;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--bc-primary) 0%, #7c3aed 100%);
  color: #fff;
  font-size: .58rem;
  font-weight: 800;
  display: grid;
  place-items: center;
  z-index: 80;
  box-shadow: 0 4px 12px rgba(96,85,205,.4);
  letter-spacing: .04em;
  transition: transform .2s ease, box-shadow .2s ease;
  pointer-events: none;
}
.bc-broker-card:hover .bc-vs {
  transform: translateY(-50%) scale(1.15);
  box-shadow: 0 6px 18px rgba(96,85,205,.55);
}

/* ---- Dropdown trigger ---- */
.bc-select-btn {
  background: var(--bc-primary-light);
  color: var(--bc-primary);
  border: 1.5px solid transparent;
  border-radius: 8px;
  font-size: .73rem;
  font-weight: 600;
  padding: .3rem .6rem;
  max-width: 145px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  transition: var(--bc-transition);
  cursor: pointer;
}
.bc-select-btn:hover,
.bc-select-btn:focus {
  background: var(--bc-primary);
  color: #fff;
  border-color: var(--bc-primary);
  outline: none;
  box-shadow: 0 4px 12px rgba(96,85,205,.25);
}

/* Dropdown list */
.bc-dropdown-menu {
  --bs-dropdown-font-size: .8rem;
  max-height: 200px;
  overflow-y: auto;
  border-radius: 10px !important;
  box-shadow: var(--bc-shadow-md) !important;
  border-color: var(--bc-border) !important;
  position: absolute !important;
  z-index: 1000000000000000000 !important;
}

/* When Bootstrap opens dropdown, make sure the card itself stacks above others */
.bc-broker-card .dropdown.show {
  z-index: 50;
  position: relative;
}
.bc-dropdown-menu .dropdown-item:hover {
  background: var(--bc-primary-light);
  color: var(--bc-primary);
}

/* ---- Open account CTA ---- */
.bc-cta {
  display: inline-block;
  font-size: .7rem;
  font-weight: 700;
  padding: .28rem .75rem;
  border-radius: 20px;
  background: var(--bc-primary);
  color: #fff;
  text-decoration: none;
  transition: var(--bc-transition);
  letter-spacing: .02em;
  white-space: nowrap;
}
.bc-cta:hover {
  background: var(--bc-primary-dark);
  color: #fff;
  transform: scale(1.05);
  box-shadow: 0 4px 14px rgba(96,85,205,.35);
}

/* ---- Remove button ---- */
.bc-remove {
  position: absolute;
  top: .4rem;
  right: .4rem;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--bc-primary-light);
  color: var(--bc-primary);
  border: none;
  display: grid;
  place-items: center;
  font-size: .6rem;
  cursor: pointer;
  transition: var(--bc-transition);
  padding: 0;
  line-height: 1;
}
.bc-remove:hover {
  background: #fee2e2;
  color: var(--bc-danger);
  transform: scale(1.15) rotate(90deg);
}

/* ===== COMPARISON DATA TABLE ===== */
.bc-table-section {
  background: var(--bc-surface);
  border-radius: 16px;
  border: 1px solid var(--bc-border);
  box-shadow: var(--bc-shadow-sm);
  overflow: hidden;
  z-index: 1!important;
}

.bc-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .855rem;
}

/* thead */
.bc-table thead th {
  background: var(--bc-surface);
  padding: .8rem 1rem;
  text-align: center;
  font-weight: 700;
  font-size: .78rem;
  color: var(--bc-primary);
  border-bottom: 2px solid var(--bc-primary-light);
  white-space: nowrap;
  /* position: sticky; */
  top: 0;
  z-index: 1;
}
.bc-table thead th:first-child {
  text-align: left;
  border-right: 1px solid var(--bc-border);
  min-width: 175px;
  width: 175px;
}

/* Section-header rows */
.bc-section-row td {
  background: linear-gradient(90deg, var(--bc-primary-light) 0%, #f5f3ff 100%);
  color: var(--bc-primary);
  font-weight: 700;
  font-size: .73rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  padding: .55rem 1rem;
  border-top: 1px solid var(--bc-border);
}

/* Data rows */
.bc-data-row {
  border-bottom: 1px solid var(--bc-border);
  transition: background .15s ease;
}
.bc-data-row:last-child { border-bottom: none; }
.bc-data-row:hover { background: var(--bc-bg); }

.bc-data-row th {
  padding: .65rem 1rem .65rem 1.25rem;
  font-weight: 500;
  font-size: .82rem;
  color: var(--bc-text);
  border-right: 1px solid var(--bc-border);
  background: #fafbff;
  min-width: 175px;
  width: 175px;
}
.bc-data-row td {
  padding: .6rem 1rem;
  text-align: center;
  color: var(--bc-muted);
  font-size: .83rem;
  vertical-align: middle;
  min-width: 155px;
}

/* Check / xmark icons */
.bc-check,
.bc-xmark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  font-size: .72rem;
  transition: transform .2s ease, box-shadow .2s ease;
}
.bc-check { background: #dcfce7; color: var(--bc-success); }
.bc-xmark { background: #fee2e2; color: var(--bc-danger); }
.bc-data-row:hover .bc-check,
.bc-data-row:hover .bc-xmark {
  transform: scale(1.22);
  box-shadow: 0 2px 8px rgba(0,0,0,.1);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 767px) {
  .bc-broker-row { grid-template-columns: 115px repeat(3, 1fr); gap: .5rem; }
  .bc-logo { width: 42px; height: 42px; }
  .bc-select-btn { font-size: .68rem; max-width: 115px; }
  .bc-table thead th:first-child,
  .bc-data-row th { min-width: 120px; width: 120px; }
}
@media (max-width: 575px) {
  .bc-broker-row { grid-template-columns: 95px repeat(2, 1fr); }
}


/* Aside max width */
.max_boundry { max-width: calc(100vw - 3rem); }

/* Main 2-column grid (content + ads sidebar) */
@media screen and (min-width: 1200px) {
  .grid_content { grid-template-columns: 1fr 264px; }
}

/* Ads sidebar */
@media screen and (min-width: 768px) {
  .addsList .sideBox { max-width: 350px !important; }
}
