.dfcs-city-selector {
  position: relative;
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  overflow: visible;
}

.dfcs-top-header.dfcs-city-selector {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.dfcs-city-selector > p:empty,
.dfcs-city-selector .dfcs-confirm > p:empty {
  display: none !important;
}

.dfcs-city-selector br {
  display: none !important;
}

.dfcs-city-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  min-width: 0;
  max-width: 100%;
  padding: 6px 12px;
  border: 1px solid #d9dee3;
  border-radius: 999px;
  background: #ffffff;
  color: #1f2b37;
  font-size: 14px;
  line-height: 1.2;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.dfcs-city-button:hover,
.dfcs-city-button:focus-visible {
  border-color: #b8cde2;
  box-shadow: 0 0 0 3px rgba(63, 132, 196, 0.16);
  outline: none;
}

.dfcs-city-button__pin {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #202c38;
  flex: 0 0 auto;
}

.dfcs-city-button__prefix {
  color: #5a6c7d;
  white-space: nowrap;
}

.dfcs-city-button__city {
  font-weight: 600;
  color: #1f3242;
  min-width: 0;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dfcs-city-button__price {
  font-weight: 700;
  color: #c43d56;
  white-space: nowrap;
  margin-left: 2px;
}

.dfcs-city-button__icon {
  font-size: 11px;
  color: #6d7d8b;
  line-height: 1;
  margin-left: 2px;
}

.dfcs-confirm {
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 2147483647 !important;
  width: min(92vw, 300px);
    max-width: 300px;
  padding: 12px 12px 11px;
  border-radius: 11px;
  border: 1px solid #f1d1dc;
  background: #ffffff;
  box-shadow: 0 14px 32px rgba(129, 55, 86, 0.18);
  pointer-events: auto;
}

.dfcs-confirm.is-visible,
.dfcs-confirm.is-visible[hidden] {
  display: block !important;
}

.dfcs-confirm::before {
  content: '';
  position: absolute;
  top: -6px;
  left: calc(50% - 6px);
  width: 10px;
  height: 10px;
  transform: rotate(45deg);
  background: #ffffff;
  border-top: 1px solid #f1d1dc;
  border-left: 1px solid #f1d1dc;
}

.dfcs-confirm__text {
  margin: 0 0 10px !important;
  color: #452536;
  font-size: 16px !important;
  line-height: 1.22 !important;
  font-weight: 500 !important;
}

.dfcs-confirm__text strong {
  font-weight: 700 !important;
}

.dfcs-confirm__actions {
  display: flex !important;
  gap: 8px !important;
}

.dfcs-confirm__btn {
  flex: 1 1 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 10px;
  border-radius: 8px;
  border: 1px solid transparent;
  font-size: 16px !important;
  font-weight: 600;
  line-height: 1 !important;
  cursor: pointer;
}

.dfcs-confirm__btn--yes {
  background: #e88faa;
  color: #ffffff;
}

.dfcs-confirm__btn--change {
  background: #f7edf2;
  color: #6a4557;
}

.dfcs-confirm__btn--detect {
  width: 100%;
  margin-top: 8px;
  min-height: 34px;
  background: #fff4f8;
  border-color: #f0cad8;
  color: #8b3f5d;
  font-size: 13px !important;
  font-weight: 600;
}

.dfcs-confirm__btn:hover,
.dfcs-confirm__btn:focus-visible {
  filter: brightness(0.98);
  outline: none;
}

.dfcs-modal {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(86, 31, 56, 0.45);
}

.dfcs-modal.is-open {
  display: flex;
}

.dfcs-modal__panel {
  width: min(740px, 100%);
  max-height: min(85vh, 760px);
  background: #ffffff;
  border: 1px solid #f1d1dc;
  border-radius: 18px;
  box-shadow: 0 24px 70px rgba(123, 55, 84, 0.25);
  padding: 20px;
  overflow: hidden;
  overscroll-behavior: contain;
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
}

.dfcs-modal__close {
  position: absolute;
  right: 12px;
  top: 10px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: #fdeff4;
  color: #7c3c56;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.dfcs-modal__close:hover,
.dfcs-modal__close:focus-visible {
  background: #f8dce8;
  outline: none;
}

.dfcs-modal__title {
  margin: 0;
  color: #2f1b26;
  font-size: 24px;
  font-weight: 700;
  padding-right: 44px;
}

.dfcs-search-wrap {
  position: relative;
  z-index: 12;
}

.dfcs-search {
  width: 100%;
  height: 46px;
  border-radius: 12px;
  border: 1px solid #edc8d6;
  padding: 0 14px;
  font-size: 15px;
  color: #3a2330;
  background: #ffffff;
}

.dfcs-search:focus-visible {
  border-color: #e28da8;
  box-shadow: 0 0 0 3px rgba(232, 143, 170, 0.2);
  outline: none;
}

.dfcs-search-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 30;
  border: 1px solid #efccd9;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 16px 34px rgba(123, 55, 84, 0.18);
  max-height: min(42vh, 320px);
  overflow: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.dfcs-search-dropdown__list {
  list-style: none;
  margin: 0;
  padding: 6px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 2px;
}

.dfcs-search-dropdown__btn {
  width: 100%;
  text-align: left;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: #4b2f3e;
  font-size: 14px;
  padding: 8px 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.dfcs-search-dropdown__btn:hover,
.dfcs-search-dropdown__btn:focus-visible {
  border-color: #efbfd0;
  background: #fff2f7;
  outline: none;
}

.dfcs-search-dropdown__name-wrap {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.dfcs-search-dropdown__name {
  color: #4b2f3e;
  font-size: 14px;
  font-weight: 500;
}

.dfcs-search-dropdown__region {
  font-size: 12px;
  color: #8d6c7a;
}

.dfcs-search-dropdown__price {
  font-size: 13px;
  font-weight: 700;
  color: #d1566a;
  white-space: nowrap;
}

.dfcs-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.dfcs-geolocate {
  border: 1px solid #efccd9;
  border-radius: 10px;
  background: #fff4f8;
  color: #8b3f5d;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  padding: 9px 12px;
}

.dfcs-geolocate:hover,
.dfcs-geolocate:focus-visible {
  border-color: #e7a8bf;
  background: #ffeaf2;
  outline: none;
}

.dfcs-status {
  margin: 0;
  font-size: 13px;
  color: #74495d;
}

.dfcs-status.is-error {
  color: #bf3158;
}

.dfcs-search-hint {
  margin: -6px 0 0;
  padding: 8px 10px;
  border: 1px solid #efcad8;
  border-radius: 10px;
  background: #fff4f8;
  color: #7d4a5f;
  font-size: 13px;
  line-height: 1.35;
}

.dfcs-custom-location {
  border: 1px solid #efd0db;
  border-radius: 12px;
  background: #fff7fa;
  padding: 10px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.dfcs-custom-location.is-suggested {
  border-color: #e7a8bf;
  box-shadow: 0 0 0 3px rgba(232, 143, 170, 0.18);
  background: #fff0f6;
}

.dfcs-custom-location .dfcs-section__title {
  margin: 0 0 6px;
}

.dfcs-custom-location__hint {
  margin: 0 0 8px;
  color: #84566a;
  font-size: 12px;
  line-height: 1.35;
}

.dfcs-custom-location__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.dfcs-custom-location__select,
.dfcs-custom-location__input {
  height: 40px;
  border: 1px solid #edc8d6;
  border-radius: 10px;
  background: #fff;
  color: #3f2735;
  font-size: 14px;
  padding: 0 10px;
  min-width: 0;
}

.dfcs-custom-location__select:focus-visible,
.dfcs-custom-location__input:focus-visible {
  border-color: #e28da8;
  box-shadow: 0 0 0 3px rgba(232, 143, 170, 0.2);
  outline: none;
}

.dfcs-custom-location__btn {
  height: 40px;
  border: 1px solid #e88faa;
  border-radius: 10px;
  background: linear-gradient(180deg, #ec9fb6, #e88faa);
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
  padding: 0 14px;
  cursor: pointer;
  white-space: nowrap;
}

.dfcs-custom-location__btn:hover,
.dfcs-custom-location__btn:focus-visible {
  border-color: #de7e9d;
  background: linear-gradient(180deg, #e997af, #e486a6);
  outline: none;
}

.dfcs-custom-location__status {
  margin: 8px 0 0;
  font-size: 13px;
  color: #7b4e63;
}

.dfcs-custom-location__status.is-error {
  color: #bf3158;
}

.dfcs-section {
  min-height: 0;
}

.dfcs-section--all-cities {
  display: none !important;
}

.dfcs-section__title {
  margin: 4px 0 10px;
  font-size: 14px;
  font-weight: 700;
  color: #6a4458;
}

.dfcs-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.dfcs-chip {
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid #efccd9;
  background: #fff4f8;
  color: #6d3e52;
  font-size: 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.dfcs-chip__price {
  font-size: 12px;
  font-weight: 700;
  color: #d1566a;
}

.dfcs-chip:hover,
.dfcs-chip:focus-visible {
  border-color: #e7a8bf;
  background: #ffedf4;
  outline: none;
}

.dfcs-city-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  max-height: 320px;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  border-top: 1px solid #edf2f7;
  padding-top: 8px;
}

.dfcs-city-list__btn {
  width: 100%;
  text-align: left;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: #4b2f3e;
  font-size: 14px;
  padding: 8px 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.dfcs-city-list__name-wrap {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.dfcs-city-list__region {
  font-size: 12px;
  color: #8d6c7a;
}

.dfcs-city-list__price {
  font-size: 13px;
  font-weight: 700;
  color: #d1566a;
  white-space: nowrap;
}

.dfcs-city-list__btn:hover,
.dfcs-city-list__btn:focus-visible {
  border-color: #efbfd0;
  background: #fff2f7;
  outline: none;
}

.dfcs-empty {
  margin: 10px 0 0;
  color: #866377;
  font-size: 14px;
}

.dfcs-hidden {
  display: none !important;
}

html.dfcs-lock-scroll,
body.dfcs-lock-scroll {
  overflow: hidden;
  height: 100%;
}

body.dfcs-lock-scroll {
  position: fixed;
  width: 100%;
  left: 0;
}

.dfcs-top-header .dfcs-city-button {
  min-height: 32px;
  padding: 5px 10px;
  border-color: #cfd8e1;
  background: #fff;
}

.dfcs-top-header,
.dfcs-top-header-parent {
  overflow: visible !important;
}

.dfcs-top-header-parent,
.dfcs-top-header,
.dfcs-city-selector {
  position: relative;
}

.dfcs-top-header .dfcs-city-button__prefix {
  font-size: 12px;
}

.dfcs-top-header .dfcs-city-button__city {
  max-width: 90px;
  font-size: 13px;
}

.dfcs-top-header .dfcs-city-button__price {
  font-size: 13px;
}

.dfcs-delivery-info {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  margin-top: 0;
  font-size: 13px;
  white-space: nowrap;
  max-width: 100%;
}

.dfcs-delivery-info__label {
  color: #6d7d8b;
}

.dfcs-delivery-info__city {
  font-weight: 600;
  color: #1f3242;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dfcs-delivery-info__price {
  font-weight: 700;
  color: #d1566a;
  white-space: nowrap;
}

.dfcs-top-header .dfcs-delivery-info__label {
  font-size: 12px;
  color: #5b6776;
}

.dfcs-top-header .dfcs-delivery-info__city {
  font-size: 14px;
  font-weight: 700;
  max-width: 110px;
  color: #1f2b37;
}

.dfcs-top-header .dfcs-delivery-info__price {
  font-size: 14px;
  font-weight: 700;
  color: #c43d56;
}

.dfcs-top-header .dfcs-delivery-info {
  display: none !important;
}

@media (max-width: 992px) {
  .dfcs-top-header-parent {
    flex-wrap: wrap !important;
    row-gap: 8px !important;
  }

  .dfcs-top-header {
    order: 99 !important;
    flex: 0 0 100% !important;
    width: 100% !important;
    justify-content: center !important;
    margin-top: 2px !important;
  }

  .dfcs-top-header .dfcs-city-button {
    width: auto !important;
    max-width: min(92vw, 360px) !important;
    min-height: 36px !important;
    font-size: 13px !important;
    padding: 6px 10px !important;
  }

  .dfcs-top-header .dfcs-city-button__city {
    max-width: 128px !important;
  }

  .dfcs-top-header .dfcs-city-button__price {
    font-size: 13px !important;
  }

  .dfcs-delivery-info {
    width: 100%;
    justify-content: center;
    text-align: center;
  }

  .dfcs-top-header .dfcs-delivery-info {
    display: none !important;
  }

  .dfcs-top-header .dfcs-confirm {
    width: min(92vw, 300px);
    position: fixed;
    left: 50vw;
    top: 96px;
    transform: translateX(-50%);
    z-index: 2147483647 !important;
  }

  .dfcs-top-header .dfcs-confirm::before {
    left: calc(50% - 5px);
  }
}

@media (max-width: 900px) {
  .dfcs-city-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .dfcs-top-header-parent {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    column-gap: 8px !important;
    row-gap: 6px !important;
  }

  .dfcs-top-header-parent > .wp-block-social-links,
  .dfcs-top-header-parent > ul.wp-block-social-links {
    order: 1;
    flex: 0 0 auto;
    margin: 0 !important;
  }

  .dfcs-top-header-parent > p,
  .dfcs-top-header-parent > .wp-block-paragraph {
    order: 2;
    flex: 1 1 0;
    min-width: 0;
    margin: 0 !important;
    text-align: center !important;
    font-size: 12px !important;
    line-height: 1.25 !important;
  }

  .dfcs-top-header-parent > .gtranslate_wrapper {
    order: 3;
    flex: 0 0 auto;
    margin: 0 0 0 auto !important;
    white-space: nowrap;
  }

  .dfcs-top-header-parent > .dfcs-top-header {
    order: 4 !important;
    flex: 0 0 100% !important;
    width: 100% !important;
    display: flex !important;
    justify-content: center !important;
    margin-top: 2px !important;
  }

  .dfcs-modal {
    padding: 0;
    align-items: flex-end;
  }

  .dfcs-modal__panel {
    width: 100%;
    height: min(88dvh, 100%);
    max-height: min(88dvh, 100%);
    border-radius: 16px 16px 0 0;
    padding: 14px 14px 16px;
    overflow: hidden;
  }

  .dfcs-modal__title {
    font-size: 18px;
  }

  .dfcs-city-list {
    grid-template-columns: 1fr;
    max-height: 28dvh;
    padding-bottom: 6px;
  }

  .dfcs-city-button {
    max-width: 100%;
  }

  .dfcs-city-button__prefix {
    display: none;
  }

  .dfcs-top-header .dfcs-city-button__prefix {
    display: inline;
  }

  .dfcs-top-header .dfcs-city-button__city {
    max-width: 100px;
  }

  .dfcs-top-header .dfcs-city-button__price {
    font-size: 12px;
  }

  .dfcs-top-header.dfcs-city-selector {
    align-items: center;
    gap: 3px;
  }

  .dfcs-top-header .dfcs-delivery-info {
    display: none !important;
  }

  .dfcs-top-header .dfcs-delivery-info__label {
    font-size: 11px;
  }

  .dfcs-top-header .dfcs-delivery-info__city {
    max-width: 84px;
    font-size: 12px;
  }

  .dfcs-top-header .dfcs-delivery-info__price {
    font-size: 12px;
  }

  .dfcs-search {
    height: 42px;
    font-size: 14px;
  }

  .dfcs-search-dropdown {
    top: calc(100% + 4px);
    max-height: 34dvh;
  }

  .dfcs-geolocate {
    padding: 8px 10px;
    font-size: 13px;
  }

  .dfcs-chip {
    padding: 6px 10px;
    font-size: 13px;
  }

  .dfcs-actions {
    gap: 8px;
  }

  .dfcs-custom-location__grid {
    grid-template-columns: 1fr;
  }

  .dfcs-search-hint {
    margin-top: -4px;
    font-size: 12px;
    padding: 7px 9px;
  }

  .dfcs-custom-location {
    padding: 9px;
  }

  .dfcs-custom-location__hint {
    font-size: 11px;
  }

  .dfcs-custom-location__btn {
    width: 100%;
  }
}

@media (max-width: 390px) {
  .dfcs-top-header-parent {
    column-gap: 6px !important;
  }

  .dfcs-top-header-parent > p,
  .dfcs-top-header-parent > .wp-block-paragraph {
    font-size: 11px !important;
  }

  .dfcs-top-header .dfcs-city-button {
    max-width: min(94vw, 300px) !important;
  }

  .dfcs-top-header .dfcs-city-button__prefix {
    font-size: 11px;
  }

  .dfcs-confirm {
    width: min(94vw, 300px);
  }
}

@media (max-width: 640px) {
  .dfcs-confirm__text {
    font-size: 15px !important;
  }

  .dfcs-confirm__btn {
    min-height: 38px;
    font-size: 15px !important;
  }
}
