/**
 * Speaker Grid element — base styles.
 *
 * Covers both legacy layouts: the 3-up profile grid (appli-speaker-grid) and the
 * photo-beside-bio row (appli-speaker-listing). Colours and type follow the same
 * tokens as Event Speakers so the two elements can sit on one page without
 * looking like different systems.
 */

.breakdance .appli-speaker-grid,
.breakdance .autogenerated-ace-speakergrid {
  /* Site palette */
  --sg-accent: var(--bde-palette-color-teal-applitools-logo, #00a298);
  --sg-heading-color: var(--bde-palette-color-1-53d6be08-e26a-42a4-bfa8-52d5899ab78e, #192745);
  --sg-body-color: var(--bde-body-text-color, #414141);
  --sg-muted-color: #73737f;
  --sg-surface: var(--bde-palette-color-gray-subtle, #f4f5f5);

  /* Layout */
  --sg-gap: 32px;
  --sg-photo-size: 200px;
  --sg-listing-photo-size: 260px;
  --sg-photo-radius: 50%;
  --sg-divider-color: #e3e1df;

  /* Type */
  --sg-name-color: var(--sg-heading-color);
  --sg-name-size: 20px;
  --sg-meta-color: var(--sg-muted-color);

  display: block;
  width: 100%;
  max-width: 100%;
  font-family: 'Plus Jakarta Sans', sans-serif;
}

.breakdance .appli-speaker-grid .sg-title,
.breakdance .autogenerated-ace-speakergrid .sg-title {
  margin: 0 0 32px;
  color: var(--sg-heading-color);
  font-size: 36px;
  font-weight: 700;
  line-height: 1.2;
}

.breakdance .appli-speaker-grid .sg-placeholder,
.breakdance .autogenerated-ace-speakergrid .sg-placeholder {
  padding: 24px;
  border: 1px dashed var(--sg-divider-color);
  border-radius: 8px;
  color: var(--sg-muted-color);
  font-size: 15px;
}

.breakdance .appli-speaker-grid .sg-photo,
.breakdance .autogenerated-ace-speakergrid .sg-photo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.breakdance .appli-speaker-grid .sg-name,
.breakdance .autogenerated-ace-speakergrid .sg-name {
  margin: 0 0 6px;
  color: var(--sg-name-color);
  font-size: var(--sg-name-size);
  font-weight: 700;
  line-height: 1.3;
}

.breakdance .appli-speaker-grid .sg-role,
.breakdance .autogenerated-ace-speakergrid .sg-role {
  margin: 0;
  color: var(--sg-meta-color);
  font-size: 15px;
  line-height: 1.45;
}

.breakdance .appli-speaker-grid .sg-company,
.breakdance .autogenerated-ace-speakergrid .sg-company {
  display: block;
  font-weight: 600;
}

/* ---------------------------------------------------------- grid layout */

.breakdance .appli-speaker-grid .sg-grid,
.breakdance .autogenerated-ace-speakergrid .sg-grid {
  display: grid;
  gap: var(--sg-gap);
  margin: 0;
  padding: 0;
  list-style: none;
}

.breakdance .appli-speaker-grid .sg-item,
.breakdance .autogenerated-ace-speakergrid .sg-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.breakdance .appli-speaker-grid .sg-item .sg-photo-wrap,
.breakdance .autogenerated-ace-speakergrid .sg-item .sg-photo-wrap {
  width: var(--sg-photo-size);
  max-width: 100%;
  aspect-ratio: 1;
  margin-bottom: 18px;
  overflow: hidden;
  border-radius: var(--sg-photo-radius);
  background: var(--sg-surface);
}

.breakdance .appli-speaker-grid .sg-logo-wrap,
.breakdance .autogenerated-ace-speakergrid .sg-logo-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  margin-top: 16px;
}

.breakdance .appli-speaker-grid .sg-logo,
.breakdance .autogenerated-ace-speakergrid .sg-logo {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}

/* ------------------------------------------------------- listing layout */

.breakdance .appli-speaker-grid .sg-listing,
.breakdance .autogenerated-ace-speakergrid .sg-listing {
  display: flex;
  flex-direction: column;
  gap: var(--sg-gap);
  margin: 0;
  padding: 0;
  list-style: none;
}

.breakdance .appli-speaker-grid .sg-listing-item,
.breakdance .autogenerated-ace-speakergrid .sg-listing-item {
  display: grid;
  grid-template-columns: minmax(0, var(--sg-listing-photo-size)) minmax(0, 1fr);
  align-items: center;
  gap: 40px;
}

.breakdance .appli-speaker-grid .sg-listing-item + .sg-listing-item,
.breakdance .autogenerated-ace-speakergrid .sg-listing-item + .sg-listing-item {
  padding-top: var(--sg-gap);
  border-top: 1px solid var(--sg-divider-color);
}

.breakdance .appli-speaker-grid .sg-listing-item .sg-photo-wrap,
.breakdance .autogenerated-ace-speakergrid .sg-listing-item .sg-photo-wrap {
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: var(--sg-photo-radius);
  background: var(--sg-surface);
}

.breakdance .appli-speaker-grid .sg-listing-item .sg-name,
.breakdance .autogenerated-ace-speakergrid .sg-listing-item .sg-name {
  font-size: calc(var(--sg-name-size) + 4px);
}

.breakdance .appli-speaker-grid .sg-bio,
.breakdance .autogenerated-ace-speakergrid .sg-bio {
  margin-top: 14px;
  color: var(--sg-body-color);
  font-size: 16px;
  line-height: 1.6;
}

.breakdance .appli-speaker-grid .sg-bio > :first-child,
.breakdance .autogenerated-ace-speakergrid .sg-bio > :first-child {
  margin-top: 0;
}

.breakdance .appli-speaker-grid .sg-bio > :last-child,
.breakdance .autogenerated-ace-speakergrid .sg-bio > :last-child {
  margin-bottom: 0;
}

/* ---------------------------------------------------------- responsive */

@media (max-width: 1024px) {
  .breakdance .appli-speaker-grid .sg-grid,
  .breakdance .autogenerated-ace-speakergrid .sg-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 767px) {
  .breakdance .appli-speaker-grid .sg-grid,
  .breakdance .autogenerated-ace-speakergrid .sg-grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .breakdance .appli-speaker-grid .sg-listing-item,
  .breakdance .autogenerated-ace-speakergrid .sg-listing-item {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
    text-align: center;
  }

  .breakdance .appli-speaker-grid .sg-listing-item .sg-photo-wrap,
  .breakdance .autogenerated-ace-speakergrid .sg-listing-item .sg-photo-wrap {
    width: var(--sg-photo-size);
    max-width: 100%;
    margin-inline: auto;
  }

  .breakdance .appli-speaker-grid .sg-title,
  .breakdance .autogenerated-ace-speakergrid .sg-title {
    font-size: 28px;
  }
}
