/* offer page */

.offer-page {
  background-color: #f8f9fb;
}

.offer-heading {
  max-width: 720px;
  margin-bottom: 36px;
}

.offer-title {
  margin: 0;
  color: #111827;
  font-size: clamp(36px, 4vw, 48px);
  font-weight: 800;
  line-height: 1.1;
}

.offer-description {
  margin: 14px 0 0;
  color: #667085;
  font-size: 16px;
  line-height: 1.55;
}

/* results header */

.offer-results-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin: 32px 0 24px;
}

.offer-results-count {
  margin: 0;
  color: #667085;
  font-size: 14px;
}

.offer-results-count strong {
  color: #111827;
  font-weight: 700;
}

/* sort */

.offer-sort-form {
  display: flex;
  align-items: center;
  gap: 10px;
}

.offer-sort-form label {
  color: #667085;
  font-size: 13px;
}

.offer-sort-form select {
  min-width: 200px;
  height: 40px;
  padding: 0 44px 0 12px;
  border: 1px solid #dfe3e8;
  border-radius: 10px;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-color: #ffffff;
  background-image:
    linear-gradient(45deg, transparent 50%, #667085 50%),
    linear-gradient(135deg, #667085 50%, transparent 50%);
  background-position:
    calc(100% - 19px) 50%,
    calc(100% - 15px) 50%;
  background-repeat: no-repeat;
  background-size:
    4px 4px,
    4px 4px;
  color: #344054;
  font-size: 13px;
  outline: none;
  cursor: pointer;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.offer-sort-form select:focus {
  border-color: var(--color-primary);
  box-shadow:
    0 0 0 3px
    color-mix(in srgb, var(--color-primary) 10%, transparent);
}

/* empty state */

.cars-empty-state {
  display: flex;
  min-height: 340px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 24px;
  text-align: center;
}

.cars-empty-icon {
  display: flex;
  width: 64px;
  height: 64px;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  border-radius: 50%;
  background-color: #eef2f6;
  color: #667085;
  font-size: 27px;
}

.cars-empty-state h2 {
  margin: 0;
  color: #344054;
  font-size: 19px;
  font-weight: 700;
}

.cars-empty-state p {
  margin: 10px 0 22px;
  color: #98a2b3;
  font-size: 14px;
}

.cars-empty-clear {
  color: var(--color-primary);
  font-size: 14px;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.cars-empty-clear:hover {
  color: var(--color-accent);
}

/* pagination */

.offer-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 36px;
  padding: 16px 0;
  background-color: transparent;
}

.offer-pagination > .text-muted {
  color: #667085;
  font-size: 13px;
}

.server-pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.server-pagination .pagination {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.server-pagination .page-link,
.server-pagination .pagination a,
.server-pagination .pagination .current,
.server-pagination .pagination .previous_page,
.server-pagination .pagination .next_page {
  display: inline-flex;
  min-width: 38px;
  height: 38px;
  align-items: center;
  justify-content: center;
  padding-inline: 11px;
  border: 1px solid #dfe3e8;
  border-radius: 9px;
  background-color: #ffffff;
  color: #667085;
  font-size: 13px;
  font-weight: 600;
  font-style: normal;
  line-height: 1;
  text-decoration: none !important;
  transition:
    border-color 0.2s ease,
    background-color 0.2s ease,
    color 0.2s ease,
    box-shadow 0.2s ease;
}

.server-pagination .page-link:hover,
.server-pagination .page-link:focus,
.server-pagination .page-link:active,
.server-pagination .pagination a:hover,
.server-pagination .pagination a:focus,
.server-pagination .pagination a:active {
  text-decoration: none !important;
}

.server-pagination .page-item.prev .page-link,
.server-pagination .page-item.previous .page-link,
.server-pagination .page-item.next .page-link,
.server-pagination .pagination .prev a,
.server-pagination .pagination .next a,
.server-pagination .previous_page,
.server-pagination .next_page {
  font-size: 0 !important;
  text-decoration: none !important;
}

.server-pagination .page-item.prev .page-link::before,
.server-pagination .page-item.previous .page-link::before,
.server-pagination .pagination .prev a::before,
.server-pagination .previous_page::before {
  content: "\2039";
  font-size: 20px;
}

.server-pagination .page-item.next .page-link::before,
.server-pagination .pagination .next a::before,
.server-pagination .next_page::before {
  content: "\203A";
  font-size: 20px;
}

.server-pagination .page-link:hover,
.server-pagination .pagination a:hover {
  border-color: var(--color-primary);
  background-color: #f8f9fb;
  color: var(--color-primary);
}

.server-pagination .page-link:focus,
.server-pagination .pagination a:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgb(0 0 0 / 3%);
  outline: none;
}

.server-pagination .page-item.active .page-link,
.server-pagination .pagination .current {
  background-color: var(--color-primary);
  color: #ffffff;
  pointer-events: none;
}

.server-pagination .page-item.disabled .page-link,
.server-pagination .previous_page.disabled,
.server-pagination .next_page.disabled {
  border-color: #eaecf0;
  background-color: #f8f9fb;
  color: #b4bbc5;
  cursor: default;
  pointer-events: none;
}

/* mobile */

@media (max-width: 600px) {
  .offer-heading {
    margin-bottom: 28px;
  }

  .offer-title {
    font-size: 34px;
  }

  .offer-description {
    font-size: 14px;
  }

  .offer-results-header {
    align-items: stretch;
    flex-direction: column;
    gap: 14px;
  }

  .offer-sort-form {
    width: 100%;
  }

  .offer-sort-form select {
    min-width: 0;
    flex: 1;
  }

  .cars-empty-state {
    min-height: 280px;
    padding: 48px 18px;
  }

  .offer-pagination {
    align-items: stretch;
    flex-direction: column;
    gap: 14px;
    margin-top: 28px;
    padding: 16px 0;
    overflow: hidden;
    text-align: center;
  }

  .server-pagination {
    position: relative;
    width: 100%;
    min-width: 0;
    justify-content: center;
    overflow: visible;
  }

  .server-pagination .pagination {
    width: 100%;
    min-width: 0;
    justify-content: center;
    flex-wrap: nowrap;
    gap: 4px;
    overflow: visible;
    padding-inline: 40px;
  }

  .server-pagination .page-item {
    flex: 0 0 auto;
  }

  .server-pagination .page-link,
  .server-pagination .pagination a,
  .server-pagination .pagination .current,
  .server-pagination .pagination .previous_page,
  .server-pagination .pagination .next_page {
    min-width: 32px;
    height: 34px;
    padding-inline: 7px;
  }

  .server-pagination .page-item.prev,
  .server-pagination .page-item.previous,
  .server-pagination .previous_page {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 2;
    box-shadow: 8px 0 0 #f8f9fb !important;
  }

  .server-pagination .page-item.next,
  .server-pagination .next_page {
    position: absolute;
    top: 0;
    right: 0;
    z-index: 2;
    box-shadow: -8px 0 0 #f8f9fb !important;
  }

  .server-pagination .page-item.prev,
  .server-pagination .page-item.previous {
    background-color: #f8f9fb;
    box-shadow: 8px 0 0 #f8f9fb;
  }

  .server-pagination .page-item.next {
    background-color: #f8f9fb;
    box-shadow: -8px 0 0 #f8f9fb;
  }
}
