/* Override */



.card-container {
    font-family: sans-serif;
    display: flex;
    flex-wrap: wrap;
    gap: 0.250rem;
    justify-content: center;
    padding-top:0.75rem;
    color: var(--chat-card-container-color);
}



.bot-card {
  cursor: pointer;
  display:flex;
  flex-direction: column;
  border-radius: 10px;
  padding: 0.5rem 1rem;
  width: 220px;
  height: 360px;
  text-align: center;
  margin: 0.5rem;
  transition: transform 0.3s, box-shadow 0.5s;
  background-color: var(--chat-card-bg);
  border: 1px solid var(--chat-card-border);
  box-shadow: 0 0 10px var(--chat-card-shadow);
  color: var(--chat-card-color);
}

/* Muted card styles */
.bot-card.blur        { filter: blur(1.5px); pointer-events: none; }
.bot-card.muted       { opacity: 0.35; pointer-events: none; }
.bot-card.sub-locked  { opacity: 0.35; filter: grayscale(40%); }
.bot-card.sub-locked .bot-avatar { filter: blur(2px); }
.bot-card.rating-locked {
    opacity: 0.55;
    border-color: rgba(180, 30, 30, 0.6);
    box-shadow: 0 0 12px rgba(180, 30, 30, 0.45);
    filter: brightness(0.7);
}
.bot-card.rating-locked .bot-avatar,
.bot-card.rating-locked .bot-tagline { filter: blur(8px); }
.bot-card.rating-locked.glow:hover {
    box-shadow: 0 0 12px rgba(180, 30, 30, 0.7), 0 0 24px rgba(180, 30, 30, 0.4);
}

.bot-action-wrapper {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0; /* prevents weird stretching */
}

.bot-card-link {
  text-decoration: none;
  color: inherit;
}
.bot-avatar-wrapper { background: var(--chat-avatar-bg); }

.bot-avatar-wrapper {
    width: 100%;
    height: 200px; /* max visible height */
    overflow: hidden;
    border-radius: 6px;
    margin-bottom: 0.5rem;
    display: flex;
    justify-content: center;
    align-items: flex-start; /* anchors image to the top */
}

.bot-avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
    filter: blur(0.5055px);
}

.bot-avatar.img {
  image-rendering: auto;
  image-rendering: smooth;
  image-rendering: -webkit-optimize-contrast;
}
.bot-name {
  font-size: calc(var(--user-font-size, 1rem) * 1.0);
  font-weight: bold;
  margin-bottom: 0.2rem;
}

.bot-tagline { color: var(--chat-tagline-color); }
.bot-title   { color: var(--chat-tagline-color); }

.bot-tagline {
  font-size: calc(var(--user-font-size, 1rem) * 0.80);
  margin-top: 0.2rem;
  flex: 1 1 auto; /* Grow if needed, shrink if space tight */
  text-align: left;
  max-height: 3.85rem;
  overflow: hidden;
  text-overflow: ellipsis;

  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
}

.bot-title {
  font-size: calc(var(--user-font-size, 1rem) * 0.85);
  font-style: italic;
}


/* Dark overlay on avatar */
.bot-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 160px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 6px;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2;
}

/* Lock icon style */
.lock-icon {
  font-size: calc(var(--user-font-size, 1rem) * 1.8);
  color: #ccc;
  text-shadow: 1px 1px 2px #000;
}

.bot-card-header, .bot-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;  /* THIS handles the vertical centering in flex */
  gap: 0.5rem;
  font-size: calc(var(--user-font-size, 1rem) * 0.8);
}
.bot-card-header {height: 1.33rem; margin-bottom: 0.33rem;}
.bot-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto; /* The magic sauce */
  min-height: 0.75rem;
}

.bot-card-header .left, .bot-card-footer .left {
    display: flex;             /* Add this */
    flex: 1 1 auto; /* Grow if needed, shrink if space tight */
    min-width: 0;   /* Prevent overflow weirdness */
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: left;
    gap: 0.25rem;
}
.bot-card-header .right, .bot-card-footer .right {
    display: flex;             /* Add this */
    flex: 0 0 auto; /* Don't grow, fixed size */
    white-space: nowrap;
    gap: 0.250rem;
}
.bot-card-footer .right,.bot-card-footer .left {
    align-items: end;       /* Vertical centering inside the left column */
}
.bot-card-header .right,.bot-card-header .left {
    align-items:center;       /* Vertical centering inside the left column */
}
