/*
 * EvaluMax public quiz library.
 * Scoped to the EvaluMax brand and .em-quiz-library shell.
 */

.public-quiz-brand-evalumax .em-quiz-library {
  overflow-x: hidden;
}

.public-quiz-brand-evalumax .em-quiz-library__header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--em-ui-space-3, 0.75rem);
  margin-bottom: var(--em-ui-space-5, 1.5rem);
}

.public-quiz-brand-evalumax .em-quiz-library__header .em-ui-heading {
  margin: 0;
}

.public-quiz-brand-evalumax .em-quiz-library__search {
  margin-bottom: var(--em-ui-space-4, 1rem);
}

.public-quiz-brand-evalumax .em-quiz-library__search-field {
  position: relative;
}

.public-quiz-brand-evalumax .em-quiz-library__search-field > i {
  position: absolute;
  top: 50%;
  left: 0.9rem;
  transform: translateY(-50%);
  color: var(--em-ui-text-muted, #64748b);
  pointer-events: none;
}

.public-quiz-brand-evalumax .em-quiz-library__search-field .em-ui-control {
  padding-left: 2.4rem;
}

.public-quiz-brand-evalumax .em-quiz-library__search-by {
  margin: var(--em-ui-space-2, 0.5rem) 0 0;
  color: var(--em-ui-text-muted, #64748b);
}

.public-quiz-brand-evalumax .em-quiz-library__filters {
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-end;
  gap: var(--em-ui-space-3, 0.75rem);
  margin-bottom: var(--em-ui-space-5, 1.5rem);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.public-quiz-brand-evalumax .em-quiz-library__filter {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 9.5rem;
  flex: 1 0 9.5rem;
}

.public-quiz-brand-evalumax .em-quiz-library__filter > span {
  font-family: var(--em-ui-font-family, inherit);
  font-size: var(--em-ui-font-size-xs, 0.75rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--em-ui-text-muted, #64748b);
}

.public-quiz-brand-evalumax .em-quiz-library__filters .leq-reset-filters-btn {
  flex: 0 0 auto;
  white-space: nowrap;
}

@media (max-width: 767.98px) {
  .public-quiz-brand-evalumax .em-quiz-library__filters {
    display: grid;
    grid-template-columns: 1fr 1fr;
    overflow-x: visible;
    gap: 0.75rem;
  }

  .public-quiz-brand-evalumax .em-quiz-library__filter {
    min-width: 0;
    flex: unset;
  }

  .public-quiz-brand-evalumax .em-quiz-library__filters .leq-reset-filters-btn {
    grid-column: 1 / -1;
    width: 100%;
    min-height: 44px;
  }
}

.public-quiz-brand-evalumax .em-quiz-library__active {
  margin-bottom: var(--em-ui-space-4, 1rem);
  color: var(--em-ui-text-secondary, #475569);
  font-size: var(--em-ui-font-size-sm, 0.875rem);
}

.public-quiz-brand-evalumax .em-quiz-library__results {
  overflow-x: hidden;
}

.public-quiz-brand-evalumax .em-quiz-library__grid {
  overflow-x: hidden;
  min-width: 0;
}

.public-quiz-brand-evalumax .em-quiz-library__grid > * {
  min-width: 0;
  max-width: 100%;
}

.public-quiz-brand-evalumax .em-quiz-library .bp-quiz-card--evalumax:not(.card) {
  display: flex;
  flex-direction: column;
  height: 100%;
  border-radius: var(--em-ui-radius-lg, 14px);
  border: 1px solid var(--em-ui-border, #e2e8f0);
  background: var(--em-ui-surface, #fff);
  box-shadow: var(--em-ui-shadow-sm, 0 1px 3px rgba(15, 23, 42, 0.08));
}

.public-quiz-brand-evalumax .em-quiz-library .bp-quiz-card--evalumax:not(.card):hover {
  transform: translateY(-2px);
  box-shadow: var(--em-ui-shadow-md, 0 8px 20px rgba(15, 23, 42, 0.09));
  border-color: var(--em-ui-primary-border, #c7d2fe);
}

.public-quiz-brand-evalumax .em-quiz-library .bp-quiz-card--evalumax .bp-quiz-card__header {
  padding: 0.75rem 0.85rem;
  background: var(--em-ui-surface, #fff);
  border-top: 3px solid var(--subject-color, var(--em-ui-primary, #4f46e5));
}

.public-quiz-brand-evalumax .em-quiz-library .bp-quiz-card--evalumax .bp-quiz-card__watermark {
  display: none;
}

.public-quiz-brand-evalumax .em-quiz-library .bp-quiz-card--evalumax .bp-quiz-card-body {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  padding: 0.75rem 0.85rem 0.9rem;
}

.public-quiz-brand-evalumax .em-quiz-library .bp-quiz-card--evalumax .bp-quiz-card-actions {
  margin-top: auto;
}

.public-quiz-brand-evalumax .em-quiz-library .bp-quiz-card--evalumax .bp-quiz-card-actions .bp-btn-primary,
.public-quiz-brand-evalumax .em-quiz-library .bp-quiz-card--evalumax .bp-quiz-card-actions .em-ui-btn {
  min-height: var(--em-ui-control-height, 44px);
}

.public-quiz-brand-evalumax .em-quiz-library__empty {
  text-align: center;
  padding: var(--em-ui-space-7, 3rem) var(--em-ui-space-4, 1rem);
}

.public-quiz-brand-evalumax .em-quiz-library__empty i {
  display: block;
  margin-bottom: var(--em-ui-space-3, 0.75rem);
  color: var(--em-ui-text-muted, #64748b);
  font-size: 1.5rem;
}

@media (min-width: 768px) {
  .public-quiz-brand-evalumax .em-quiz-library__filters {
    overflow-x: visible;
    flex-wrap: wrap;
  }

  .public-quiz-brand-evalumax .em-quiz-library__filter {
    flex: 1 1 11rem;
    min-width: 11rem;
  }
}
