:host {
  display: block;
}

[hidden] {
  display: none !important;
}

.cb-wrapper {
  --cb-font-ui: "Adobe Clean Spectrum VF", "Adobe Clean", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --cb-font-display: "Adobe Clean Display", "Adobe Clean Spectrum VF", "Adobe Clean", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --cb-accent: #3b63fb;
  --cb-accent-hover: color-mix(in srgb, #3b63fb 85%, #000);
  --cb-heading-color: #131313;
  --cb-heading-font-size: 28px;

  box-sizing: border-box;
  width: 100%;
  background: var(--cb-wrapper-bg, transparent);
  font-family: var(--cb-font-ui);
  padding-left: 16px;
  padding-right: 16px;
  @media (min-width: 1025px) {
    padding-left: 10px;
    padding-right: 10px;
  }
}

/* The wrapper (background, padding) spans the full width; the content is capped and centered. */
.cb-inner {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 1140px;
  margin: 0 auto;

  @media (min-width: 1025px) {
    padding-left: 10px;
  padding-right: 10px;
  }
}

.cb-wrapper.has-top-padding {
  padding-top: 32px;
}

.cb-wrapper.has-bottom-padding {
  padding-bottom: 32px;
}

.cb-wrapper *,
.cb-wrapper *::before,
.cb-wrapper *::after {
  box-sizing: border-box;
}

.cb-section-title {
  margin: 0;
  font-family: var(--cb-font-ui);
  font-size: var(--cb-heading-font-size);
  font-weight: 800;
  line-height: 32px;
  color: var(--cb-heading-color);
  overflow-wrap: break-word;
}

/* Card */

.cb-card {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  min-height: 320px;
  border-radius: 16px;
  overflow: hidden;
  isolation: isolate;
  color: #fff;
}

.cb-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  border-radius: 16px;
  background: linear-gradient(135deg, #2b2b30, #4a4a52);
}

.cb-bg-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.cb-bg-blur {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.44);
  -webkit-backdrop-filter: blur(100px);
  backdrop-filter: blur(100px);
}

/* Body */

.cb-body {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 24px;
  min-width: 0;
  padding: 32px;
}

.cb-eyebrow {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  width: 100%;
}

.cb-badge {
  position: relative;
  display: inline-block;
  max-width: 100%;
  padding: 7px 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.11);
  font-size: 14px;
  line-height: 18px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Gradient hairline around the badge: 50% white at the top/bottom edges, fading out at the sides. */
.cb-badge::before {
  content: "";
  position: absolute;
  inset: 0;
  padding: 1px;
  border-radius: inherit;
  background: linear-gradient(346deg, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0) 50%, rgba(255, 255, 255, 0.5));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  pointer-events: none;
}

.cb-title-wrap {
  flex: 1 1 auto;
  width: 100%;
  min-height: 0;
}

.cb-title {
  margin: 0;
  font-family: var(--cb-font-display);
  font-size: 25px;
  font-weight: 800;
  line-height: 30px;
  overflow-wrap: break-word;
}

/* Prize / winner label */

.cb-label {
  display: flex;
  align-items: center;
  width: 100%;
}

.cb-label-icon,
.cb-avatar {
  flex: none;
  width: 48px;
  height: 48px;
}

.cb-avatar {
  border-radius: 50%;
  object-fit: cover;
}

.cb-avatar-placeholder {
  display: block;
  background: linear-gradient(135deg, #7a9cff, #c183ff);
}

.cb-avatar:not([hidden]) + .cb-avatar-placeholder {
  display: none;
}

.cb-label-text {
  display: flex;
  flex: 1 1 0;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  padding-left: 12px;
}

.cb-label-title {
  margin: 0;
  font-family: var(--cb-font-display);
  font-size: 20px;
  font-weight: 800;
  line-height: 1;
  overflow-wrap: break-word;
}

.cb-label-desc {
  margin: 0;
  font-size: 14px;
  line-height: 18px;
  overflow-wrap: break-word;
}

.cb-place {
  display: flex;
  align-items: flex-start;
}

.cb-place-icon {
  flex: none;
  width: 18px;
  height: 18px;
}

/* The bundled placement icon is dark; render it white like the design. Custom icons are shown as supplied. */
.cb-place-icon.is-default {
  filter: brightness(0) invert(1);
}

.cb-place-text {
  flex: 1 1 0;
  min-width: 0;
  margin: 0;
  padding-left: 4px;
  font-size: 14px;
  line-height: 18px;
  overflow-wrap: break-word;
}

/* CTA */

.cb-actions {
  display: flex;
  flex-wrap: wrap;
  row-gap: 8px;
  width: 100%;
}

.cb-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 16px;
  background: var(--cb-accent);
  color: #fff;
  font-family: var(--cb-font-ui);
  font-size: 14px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}

.cb-cta:hover {
  background: var(--cb-accent-hover);
  color: #fff;
}

.cb-cta:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

/* Cover */

.cb-cover {
  position: relative;
  z-index: 1;
  align-self: stretch;
  min-width: 0;
  overflow: hidden;
  border-radius: 16px;
  pointer-events: none;
}

.cb-cover-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Vertical layout: cover on top at a fixed 16:9 ratio, card height follows the content. */

@media (max-width: 768px) {
  .cb-card {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto;
    min-height: 0;
  }

  .cb-cover {
    order: -1;
    aspect-ratio: 600 / 337.5;
  }

  .cb-body {
    align-self: start;
  }

  .cb-title-wrap {
    flex: none;
  }
}
