/* Event search — homepage + /busca/ page.
   Scoped under .es-* so it can't collide with the calendar or WhatsApp styles.
   Relies on the site's :root variables (--primary-orange, --ink, ...). */

.es-search {
  max-width: 1200px;
  margin: 0 auto;
  text-align: left;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* ---------- Search bar ---------- */

.es-form {
  display: flex;
  align-items: stretch;
  gap: 10px;
  padding: 12px;
  background: var(--white);
  border-radius: 24px;
  box-shadow: 0 20px 50px rgba(60, 30, 110, 0.16);
}

/* Each field is a box; the real input/select fills it, so the whole box is
   clickable, and the icon + small label sit on top. */
.es-field {
  position: relative;
  flex: 1;
  min-width: 0;
  min-height: 66px;
  border: 1px solid #ECE7F3;
  border-radius: 16px;
  background: var(--white);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.es-field-what {
  flex: 1.4;
}

.es-field:hover {
  border-color: #D9CFEA;
}

.es-field:focus-within {
  border-color: var(--primary-orange);
  box-shadow: 0 0 0 3px rgba(255, 149, 0, 0.15);
}

.es-icon {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 20px;
  color: var(--ink, #1F1640);
  pointer-events: none;
  z-index: 1;
}

.es-field-body {
  display: contents;
}

.es-label {
  position: absolute;
  left: 54px;
  top: 12px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #6B6580;
  pointer-events: none;
  z-index: 1;
}

.es-control {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 28px 40px 10px 54px;
  border: none;
  border-radius: 16px;
  background: transparent;
  color: var(--ink, #1F1640);
  font-family: inherit;
  /* 16px keeps iOS Safari from zooming in on focus */
  font-size: 16px;
  text-overflow: ellipsis;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
}

.es-control::placeholder {
  color: #5E5873;
  opacity: 1;
}

.es-control::-webkit-search-cancel-button {
  cursor: pointer;
}

select.es-control {
  cursor: pointer;
}

.es-chevron {
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 13px;
  color: var(--ink, #1F1640);
  pointer-events: none;
}

.es-submit {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 30px;
  border: none;
  border-radius: 16px;
  background: linear-gradient(180deg, #FFA126 0%, var(--primary-orange) 100%);
  color: var(--white);
  font-family: inherit;
  font-size: 17px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(255, 149, 0, 0.32);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.es-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 26px rgba(255, 149, 0, 0.4);
}

.es-submit:disabled {
  cursor: progress;
  transform: none;
}

/* ---------- Results ---------- */

.es-results {
  margin-top: 28px;
}

.es-results[hidden] {
  display: none;
}

.es-results-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink, #1F1640);
}

.es-clear {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 0;
  border: none;
  background: none;
  color: var(--ink-soft, #4E4867);
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}

.es-clear:hover {
  color: var(--ink, #1F1640);
  text-decoration: underline;
}

.es-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.es-item a {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 100%;
  padding: 14px 16px;
  border: 1px solid #ECE7F3;
  border-radius: 16px;
  background: var(--white);
  color: var(--ink, #1F1640);
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(60, 30, 110, 0.04);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.es-item a:hover {
  transform: translateY(-2px);
  border-color: #D9CFEA;
  box-shadow: 0 10px 24px rgba(60, 30, 110, 0.1);
}

.es-item.es-featured a {
  border-color: rgba(255, 149, 0, 0.45);
}

.es-date {
  flex: 0 0 58px;
  padding: 8px 0;
  border-radius: 12px;
  background: #F3EEFB;
  color: var(--primary-purple);
  text-align: center;
  line-height: 1.1;
}

.es-date-day {
  display: block;
  font-size: 20px;
  font-weight: 700;
}

.es-date-month,
.es-date-weekday {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.es-date-weekday {
  margin-top: 2px;
  font-weight: 500;
  text-transform: lowercase;
  opacity: 0.7;
}

.es-info {
  flex: 1;
  min-width: 0;
}

.es-name {
  display: block;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
}

.es-place {
  display: block;
  margin-top: 3px;
  font-size: 13px;
  color: var(--ink-soft, #4E4867);
}

.es-place i {
  margin-right: 5px;
  color: var(--primary-orange);
}

.es-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #FFF1DE;
  color: #B86A00;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.es-go {
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #F6F3FA;
  color: var(--ink, #1F1640);
  font-size: 13px;
}

.es-go-text {
  display: none;
}

.es-item a:hover .es-go {
  background: var(--primary-orange);
  color: var(--white);
}

.es-empty {
  padding: 32px 16px;
  border: 1px dashed #D9CFEA;
  border-radius: 16px;
  background: var(--white);
  color: var(--ink-soft, #4E4867);
  font-size: 15px;
  text-align: center;
}

.es-empty i {
  display: block;
  margin-bottom: 10px;
  font-size: 24px;
  color: var(--primary-orange);
}

.es-more {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: fit-content;
  margin: 20px auto 0;
  padding: 13px 26px;
  border: 1.5px solid #CFC3E6;
  border-radius: 999px;
  background: var(--white);
  color: var(--ink, #1F1640);
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.es-more:hover {
  border-color: var(--primary-purple);
  box-shadow: 0 6px 18px rgba(90, 63, 132, 0.12);
}

/* ---------- Tablet: button drops below the fields ---------- */
@media (max-width: 1000px) {
  .es-form {
    flex-wrap: wrap;
  }

  .es-field-what {
    flex: 1 1 100%;
  }

  .es-submit {
    flex: 1 1 100%;
    min-height: 56px;
  }
}

/* ---------- Phones: everything stacks ---------- */
@media (max-width: 640px) {
  .es-form {
    flex-direction: column;
    gap: 8px;
    padding: 10px;
    border-radius: 20px;
  }

  .es-field {
    flex: 0 0 auto;
    min-height: 60px;
  }

  .es-label {
    top: 10px;
  }

  .es-control {
    padding-top: 26px;
  }

  .es-submit {
    flex: 0 0 auto;
    min-height: 54px;
  }

  .es-list {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .es-item a {
    gap: 12px;
    padding: 12px;
  }

  .es-go {
    display: none;
  }

  .es-more {
    width: 100%;
  }
}
