.races-footer {
  position: relative;
  margin-top: 70px;
  color: #fff;
  font-size: 1.55rem;
}

.races-footer a { color: #fff; text-decoration: none; }
.races-footer a:hover { color: #ffc276; }

.races-footer__main {
  position: relative;
  overflow: hidden;
  background: radial-gradient(circle at left center, #5bcbea 0%, #4bb7e3 34%, #43a2dc 78%);
  border-top: 7px solid #ff6b6b;
  border-bottom: 7px solid #ff6b6b;
}

.races-footer__main-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(360px, 1.55fr) minmax(250px, .72fr) minmax(280px, .92fr);
  gap: clamp(45px, 7vw, 115px);
  min-height: 445px;
  padding-top: 58px;
  padding-bottom: 15px;
}

.races-footer__watermark {
  position: absolute;
  top: 50%;
  left: -45px;
  width: clamp(330px, 34vw, 680px);
  height: auto;
  opacity: .1;
  pointer-events: none;
  transform: translateY(-50%);
}

.races-footer h2 {
  display: flex;
  gap: 15px;
  align-items: center;
  margin: 0 0 25px;
  color: #fff;
  font-family: var(--heading-font);
  font-size: 2.35rem;
  font-weight: 700;
  line-height: 1.15;
  text-transform: uppercase;
}

.races-footer h2 img {
  width: 58px;
  height: 58px;
  flex: 0 0 auto;
  object-fit: contain;
}

.races-footer h3 {
  margin: 0 0 8px;
  color: #ffc276;
  font-size: 1.9rem;
  font-weight: 400;
  line-height: 1.2;
}

.races-footer__contacts p { margin: 0 0 8px; }
.races-footer__contacts a,
.races-footer__contacts .races-footer__email { color: #ffd071; font-weight: 700; }

.races-footer__search {
  display: flex;
  width: min(100%, 455px);
  margin-top: 45px;
  border-radius: 15px;
  overflow: hidden;
  background: rgba(15, 103, 148, .42);
}

.races-footer__search input {
  min-width: 0;
  width: 100%;
  height: 58px;
  padding: 0 8px 0 19px;
  border: 0;
  outline: 0;
  background: transparent;
  color: #fff;
  font: inherit;
}

.races-footer__search input::placeholder { color: rgba(255, 255, 255, .82); }
.races-footer__search button {
  width: 55px;
  flex: 0 0 55px;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, .86);
  font-size: 1.55rem;
  cursor: pointer;
}
.races-footer__search button:hover { color: #ffd071; }

.races-footer__nav,
.races-footer__popular { padding-top: 5px; }
.races-footer__group { margin-bottom: 40px; }
.races-footer__group a,
.races-footer__popular a { display: block; margin: 0 0 10px; line-height: 1.28; }

.races-footer__countries { background: #0870ad; }
.races-footer__countries-inner {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 20px;
  align-items: start;
  min-height: 190px;
  padding-top: 34px;
  padding-bottom: 38px;
}
.races-footer__countries h3 { text-align: right; }
.races-footer__country-list { display: flex; flex-wrap: wrap; gap: 9px 13px; line-height: 1.4; }
.races-footer__country-list a { display: inline-block; }
.races-footer__country-list span { color: rgba(255, 255, 255, .72); }
.races-footer__country-list .is-current { color: #ffd071; font-weight: 700; }

.races-footer__edit {
  position: absolute;
  z-index: 3;
  top: 18px;
  right: max(18px, calc((100vw - 1200px) / 2));
}

.races-footer__edit:hover {
  background: var(--races-edit-purple-bg-hover);
  color: var(--races-edit-purple-fg);
}

.races-footer-edit-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.races-footer-edit-row {
  margin: 0;
}

.races-footer-edit-row__fields {
  display: grid;
  grid-template-columns: minmax(0, .7fr) minmax(0, .8fr) minmax(0, 1.2fr) auto;
  gap: 12px;
  align-items: center;
}

.races-footer-edit-row__fields--links {
  grid-template-columns: minmax(0, .8fr) minmax(0, 1.5fr) auto;
}

.races-footer-edit-row__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  align-self: center;
  padding-bottom: 0;
}

.races-footer-edit-row__remove {
  appearance: none;
  background: transparent;
  border: 1px solid #c0392b;
  border-radius: 4px;
  color: #c0392b;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  min-height: 36px;
  padding: 0 12px;
  white-space: nowrap;
}

.races-footer-edit-row__remove:hover {
  background: rgba(192, 57, 43, 0.08);
  border-color: #a93226;
  color: #a93226;
}

.races-footer-edit-row__delete-field {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.races-footer-edit-row__pending-delete {
  display: none;
  margin: 8px 0 0;
  padding: 8px 10px;
  border-radius: 4px;
  background: rgba(192, 57, 43, 0.12);
  color: #922b21;
  font-size: 13px;
}

.races-footer-edit-row.is-pending-delete {
  opacity: 0.72;
}

.races-footer-edit-row.is-pending-delete .races-footer-edit-row__pending-delete {
  display: block;
}

.races-footer-edit-row.is-pending-delete .races-footer-edit-row__fields {
  pointer-events: none;
}

.races-footer-edit-row.is-pending-delete .races-footer-edit-row__actions {
  pointer-events: auto;
}

.races-footer-edit-section-actions {
  margin: 10px 0 4px;
}

@media (max-width: 640px) {
  .races-footer-edit-row__fields,
  .races-footer-edit-row__fields--links {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .races-footer-edit-row__actions {
    justify-content: flex-start;
    padding-bottom: 0;
  }
}

@media (max-width: 989px) {
  .races-footer__main-inner { grid-template-columns: 1.25fr .75fr; min-height: 0; gap: 50px; }
  .races-footer__popular { grid-column: 1 / -1; columns: 2; }
  .races-footer__popular h3 { column-span: all; }
  .races-footer__search { margin-top: 42px; }
}

@media (max-width: 640px) {
  .races-footer { margin-top: 45px; font-size: 1.4rem; }
  .races-footer__main-inner { display: block; padding-top: 48px; padding-bottom: 18px; }
  .races-footer__watermark { top: 50%; left: -75px; width: 330px; }
  .races-footer h2 img { width: 48px; height: 48px; }
  .races-footer__identity, .races-footer__nav, .races-footer__popular { margin-bottom: 38px; }
  .races-footer__search { margin-top: 30px; }
  .races-footer__popular { columns: 1; }
  .races-footer__countries-inner { display: block; min-height: 0; padding-top: 35px; padding-bottom: 38px; }
  .races-footer__countries h3 { margin-bottom: 12px; text-align: left; }
  .races-footer__edit { top: 12px; right: 12px; }
}
