/* Códigos Event Filter — front-end styles */
.codigos-event-filter {
  --cef-magenta: #c91490;
  --cef-cream: #f7f0e4;
  margin: 0 0 34px;
  position: relative;
  z-index: 2;
}

/* Intentionally transparent: the controls sit directly on the page. */
.cef-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 18px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.cef-field {
  display: grid;
  gap: 8px;
  flex: 1 1 260px;
  margin: 0;
}

.cef-label {
  color: var(--cef-magenta);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: .045em;
  line-height: 1.2;
  text-transform: uppercase;
}

.cef-date,
.cef-tag {
  width: 100%;
  min-height: 58px;
  border: 2px solid var(--cef-magenta);
  border-radius: 10px;
  padding: 12px 46px 12px 18px;
  background-color: rgba(247, 240, 228, .5);
  color: var(--cef-magenta);
  font: inherit;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
  transition: background-color .2s ease, box-shadow .2s ease, transform .2s ease;
  accent-color: var(--cef-magenta);
  /* Prevent theme/global form styles from forcing tag names to lowercase. */
  text-transform: none !important;
}

.cef-date:hover,
.cef-tag:hover {
  background-color: rgba(247, 240, 228, .82);
}

.cef-date option,
.cef-tag option {
  background: var(--cef-cream);
  color: #111;
  text-transform: none !important;
}

.cef-reset {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 26px;
  min-height: 58px;
  border: 2px solid var(--cef-magenta);
  border-radius: 10px;
  padding: 12px 20px 12px 26px;
  background: var(--cef-magenta);
  color: var(--cef-cream);
  font: inherit;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: .01em;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease;
}

.cef-reset-arrow {
  font-size: 28px;
  font-weight: 400;
  line-height: .7;
  transform: translateY(-1px);
}

.cef-reset:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(201, 20, 144, .2);
}

.cef-reset:active {
  transform: translateY(0);
}

.cef-reset:focus-visible,
.cef-date:focus-visible,
.cef-tag:focus-visible {
  outline: 3px solid var(--cef-magenta);
  outline-offset: 3px;
}

.cef-status {
  margin: 14px 0 0;
  color: var(--cef-magenta);
  font-weight: 700;
}

.cef-event-item {
  transition: opacity .35s ease, filter .35s ease, transform .35s ease;
  scroll-margin-top: 120px;
}

.cef-filter-active .cef-event-item.cef-is-dimmed {
  opacity: var(--cef-dim-opacity, .24) !important;
  filter: saturate(.15) grayscale(.35);
}

.cef-filter-active .cef-event-item.cef-is-match {
  opacity: 1 !important;
  filter: saturate(1) grayscale(0);
  transform: translateZ(0);
}

@media (prefers-reduced-motion: reduce) {
  .cef-event-item,
  .cef-reset,
  .cef-date,
  .cef-tag { transition: none; }
  html { scroll-behavior: auto; }
}

@media (max-width: 767px) {
  .cef-controls { gap: 14px; }
  .cef-field { flex-basis: 100%; }
  .cef-date,
  .cef-tag,
  .cef-reset { min-height: 54px; }
  .cef-reset { width: 100%; }
}
