.kp-trip-dates,
.kp-trip-dates *::before,
.kp-trip-dates *::after {
  box-sizing: border-box;
}

.kp-trip-dates {
  --kp-trip-navy: #14245a;
  --kp-trip-blue: #2348e6;
  --kp-trip-orange: #ff6128;
  --kp-trip-muted: #6b7896;
  --kp-trip-light: #ffffff;
  --kp-trip-border: #2348e6;
  --kp-trip-disabled: #b8b8b8;
  --kp-trip-badge-bg: #ff6128;
  --kp-trip-badge-text: #ffffff;

  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

.kp-trip-dates-departure-filter {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  width: 100%;
  margin-bottom: 4px;
}

.kp-trip-dates-departure-filter__label {
  grid-column: 1 / -1;
  color: var(--kp-trip-navy);
  font-weight: 600;
  line-height: 1.35;
}

.kp-trip-dates-departure-filter__pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-width: 100%;
}

.kp-trip-dates .kp-trip-dates-departure-filter__pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  max-width: 100%;
  margin: 0;
  padding: 6px 14px;
  border: 1px solid rgba(26, 39, 68, 0.18);
  border-radius: 20px;
  background: #ffffff;
  color: var(--kp-trip-muted);
  font: inherit;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.3;
  text-align: center;
  overflow-wrap: anywhere;
  cursor: pointer;
  transition: color 0.15s, background-color 0.15s, border-color 0.15s;
}

.kp-trip-dates .kp-trip-dates-departure-filter__pill:hover {
  border-color: var(--kp-trip-navy);
  background: var(--kp-trip-navy);
  color: #ffffff;
}

.kp-trip-dates .kp-trip-dates-departure-filter__pill.is-active {
  border-color: var(--kp-trip-navy);
  background: var(--kp-trip-navy);
  color: #ffffff;
  font-weight: 700;
}

.kp-trip-dates .kp-trip-dates-departure-filter__pill:focus-visible {
  outline: 3px solid var(--kp-trip-orange);
  outline-offset: 2px;
}

.kp-trip-dates .kp-trip-dates-departure-filter__clear {
  align-self: center;
  min-height: 36px;
  margin: 2px 0 0;
  padding: 6px 0;
  border: 0;
  background: transparent;
  color: var(--kp-trip-navy);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}

.kp-trip-dates .kp-trip-dates-departure-filter__clear:hover {
  border: 0;
  background: transparent;
  color: var(--kp-trip-navy);
  box-shadow: none;
  transform: none;
}

.kp-trip-dates .kp-trip-dates-departure-filter__clear:focus-visible {
  outline: 3px solid var(--kp-trip-orange);
  outline-offset: 2px;
}

.kp-trip-dates .kp-trip-dates-departure-filter__clear[hidden],
.kp-trip-date-item[hidden],
.kp-trip-dates-no-results[hidden] {
  display: none !important;
}

.kp-trip-dates-no-results {
  padding: 20px 24px;
  border: 1px solid var(--kp-trip-border);
  border-radius: 14px;
  color: var(--kp-trip-navy);
  background: var(--kp-trip-light);
}

.kp-trip-dates-header {
  display: grid;
  grid-template-columns: 1.1fr 1.4fr 1fr 0.9fr 0.9fr;
  gap: 24px;
  padding: 18px 24px;
  background: var(--kp-trip-blue);
  color: #ffffff;
  border-radius: 14px 14px 0 0;
}

.kp-trip-dates-header > div {
  min-width: 0;
}

.kp-trip-date-item {
  position: relative;
  display: grid;
  grid-template-columns: 1.1fr 1.4fr 1fr 0.9fr 0.9fr;
  gap: 24px;
  align-items: center;
  padding: 24px;
  background: var(--kp-trip-light);
  border: 1px solid var(--kp-trip-border);
  border-radius: 0;
  overflow: hidden;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.kp-trip-date-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--kp-trip-orange);
  opacity: 0;
  transition: opacity 0.18s ease, background-color 0.18s ease;
}

.kp-trip-date-item:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(20, 36, 90, 0.08);
}

.kp-trip-date-item:hover::before,
.kp-trip-date-item.is-last-place::before {
  opacity: 1;
}

.kp-trip-date-col {
  min-width: 0;
}

.kp-trip-date-label {
  display: none;
  margin-bottom: 6px;
  color: var(--kp-trip-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.kp-trip-date-value {
  color: var(--kp-trip-navy);
  line-height: 1.35;
  min-width: 0;
}

.kp-trip-date-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-left: 8px;
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--kp-trip-badge-bg);
  color: var(--kp-trip-badge-text);
  line-height: 1.2;
  text-transform: uppercase;
  white-space: normal;
  overflow-wrap: anywhere;
}

.kp-trip-date-col-button {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.kp-trip-date-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 118px;
  min-height: 44px;
  padding: 12px 22px;
  border-radius: 999px;
  border: 1px solid var(--kp-trip-blue);
  background: var(--kp-trip-blue);
  color: #ffffff;
  line-height: 1;
  text-decoration: none;
  text-align: center;
  transition: all 0.18s ease;
  cursor: pointer;
  white-space: nowrap;
}

.kp-trip-date-button:hover,
.kp-trip-date-button:focus {
  background: var(--kp-trip-navy);
  border-color: var(--kp-trip-navy);
  color: #ffffff;
  text-decoration: none;
}

.kp-trip-date-button-flight {
  background: var(--kp-trip-blue);
  border-color: var(--kp-trip-blue);
  color: #ffffff;
}

.kp-trip-date-button-booking {
  background: var(--kp-trip-orange);
  border-color: var(--kp-trip-orange);
  color: #ffffff;
}

.kp-trip-date-button-booking:hover,
.kp-trip-date-button-booking:focus {
  background: #e94f1d;
  border-color: #e94f1d;
}

.kp-trip-date-button.is-disabled,
.kp-trip-date-button.is-disabled:hover,
.kp-trip-date-button.is-disabled:focus {
  background: var(--kp-trip-disabled);
  border-color: var(--kp-trip-disabled);
  color: #ffffff;
  cursor: not-allowed;
  pointer-events: none;
  opacity: 1;
}

.kp-trip-date-item.is-sold-out {
  opacity: 0.78;
}

.kp-trip-date-item.is-sold-out::before {
  background: var(--kp-trip-disabled);
}

@media (max-width: 1024px) {
  .kp-trip-dates-header {
    display: none;
  }

  .kp-trip-date-item {
    grid-template-columns: 1fr 1fr;
    gap: 18px 24px;
    border-radius: 14px;
  }

  .kp-trip-date-label {
    display: block;
  }

  .kp-trip-date-col-button {
    align-items: stretch;
  }

  .kp-trip-date-button {
    width: 100%;
  }
}

@media (max-width: 640px) {
  .kp-trip-dates-departure-filter {
    grid-template-columns: minmax(0, 1fr);
  }

  .kp-trip-dates .kp-trip-dates-departure-filter__clear {
    justify-self: start;
  }

  .kp-trip-date-item {
    grid-template-columns: 1fr;
    padding: 20px;
  }

  .kp-trip-date-badge {
    display: flex;
    margin-left: 0;
    margin-top: 8px;
  }

  .kp-trip-date-button {
    min-width: 100%;
  }
}
