/* === ОСНОВНЫЕ КОМПОНЕНТЫ МОДАЛЬНОГО ОКНА === */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1001;
}

.modal-window {
  position: relative;
  width: 680px;
  max-width: 90vw;
  background-color: #ffffff;
  border-radius: 12px;
  z-index: 1002;
  overflow: hidden;
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 20px;
  width: 16px;
  height: 16px;
  border: none;
  background: none;
  font-size: 16px;
  line-height: 1;
  color: #000;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: color 0.2s ease;
  z-index: 10;
}

.modal-window .modal-window-header {
  padding: 30px 30px 20px 30px;
  font-weight: 600;
  font-size: 22px;
}

.modal-window-body {
  padding: 0 30px 30px 30px;
}

/* === ТИПЫ КОМПОНОВКИ === */
.modal-window-body--horizontal {
  display: flex;
  gap: 20px;
}

.modal-window-body--horizontal .modal-window-body__left,
.modal-window-body--horizontal .modal-window-body__right {
  flex: 1;
  min-width: 200px;
  border-radius: 8px;
}

.modal-window-body--vertical {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.modal-window-body--vertical .modal-window-body__top,
.modal-window-body--vertical .modal-window-body__bottom {
  border-radius: 8px;
}

/* === ЛЕВАЯ ЧАСТЬ (ИНФОРМАЦИОННЫЙ БЛОК) === */
.modal-window-body__data-time {
  display: inline-grid;
  gap: 10px;
  padding-bottom: 20px;
}

.modal-window-body__data-time .modal-window-body__address {
  background-image: url('../../../../shop/redesign/assets/img/address.svg');
  background-repeat: no-repeat;
  background-position: left center;
  padding-left: 24px;
  line-height: 1.4;
}

.modal-window-body__data-time .modal-window-body__time {
  background-image: url('../../../../shop/redesign/assets/img/time.svg');
  background-repeat: no-repeat;
  background-position: left center;
  padding-left: 24px;
  line-height: 1.4;
}

.modal-window-body__details {
  display: inline-grid;
  gap: 16px;
}

.modal-window-body__details .modal-window-body__subtitle {
  font-weight: 600;
  font-size: 18px;
}

.modal-window-body__details p {
  font-weight: 400;
  font-size: 14px;
  padding: 0;
  margin: 0;
  line-height: 1;
}

/* === ФОРМА ДОСТАВКИ === */
.modal-window-body__form-address {
  display: inline-grid;
  gap: 16px;
  padding-bottom: 16px;
}

.modal-window-body__form-checkboxes {
  display: inline-grid;
  gap: 16px;
}

.modal-window-body__form-checkboxes .green-checkbox {
  margin: 0 !important;
}

.modal-window-body__form-date-time {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.modal-window-body__form-date,
.modal-window-body__form-time {
  flex: 1;
}

.modal-window-body__form-button {
  padding-top: 20px;
}

.modal-window-body__submit-button {
  width: 100%;
  height: 44px;
  border-radius: 8px;
  gap: 10px;
  padding: 10px 20px;
  background-color: #008C3A;
}

.modal-window-body__submit-button:disabled {
  color: #999999;
  background-color: #EBEBEB;
}

/* === ЭЛЕМЕНТЫ ФОРМЫ === */
.modal-window-body label {
  font-weight: 500;
  font-size: 14px;
  padding-bottom: 10px;
  margin-bottom: 0;
}

.modal-window-body form input,
.modal-window-body form select {
  width: 100%;
  height: 44px;
  padding: 10px 16px;
  border: 1px solid #DADADA;
  border-radius: 8px;
  font-weight: 400;
  font-size: 14px;
  box-shadow: none;
  text-shadow: none;
}

.modal-window-body form input:valid {
  border-color: #008c3a !important;
}

.modal-window-body form input:invalid {
  border-color: #dc3545 !important;
}

.modal-window-body form input:disabled {
  background-color: #FFFFFF;
}

/* Специальные стили для select адреса */
#adress-field {
  color: #999999;
}

#adress-field:valid {
  color: #000000;
}

#adress-field option {
  color: #000000;
}

#adress-field option[disabled] {
  color: #999999;
}

.m-b-30 {
  margin-bottom: 30px;
}

/* === СТИЛИ ДЛЯ ГРУППЫ ИНПУТОВ=== */
.modal-window-body__form-control:has(input + input) {
  display: flex;
  gap: 0;
  width: 100%;
}

.modal-window-body__form-control:has(input + input) input {
  border-radius: 0;
  border-right: none;
  flex: 1 1 0;
  min-width: 0;
}

.modal-window-body__form-control:has(input + input) input:not(:last-child) {
  border-right: none;
}

.modal-window-body__form-control:has(input + input) input:last-child {
  border-right: 1px solid #DADADA;
}

.modal-window-body__form-control:has(input + input) input:first-child {
  border-radius: 8px 0 0 8px;
}

.modal-window-body__form-control:has(input + input) input:last-child {
  border-radius: 0 8px 8px 0;
}

.fivepost-details {
  display: flex;
  gap: 20px;
}

.fivepost-details .fivepost-info{
  flex: 3;
  min-width: 200px;
  border-radius: 8px;
}

.fivepost-details .fivepost-button {
  flex: 1;
  min-width: 200px;
  border-radius: 8px;
}

.fivepost-info {
  font-weight: 400;
  font-size: 14px;
}

.fivepost-info span {
  color: #999999;
}

.fivepost-info span.normal {
  color: #000000;
}

/* === КАРТА === */
.map.vpz {
  width: 300px;
  max-height: 300px;
}

.modal-window-body__5post {
  width: 100%;
  height: 620px;
}

.modal-window-body__5post #fivepost_map {
  width: 100% !important;
  height: 100% !important;
}

.sc-bRKDuR.eYZbTe {
  display: none;
}


@media (max-width: 768px) {
  .modal-overlay {
    align-items: flex-start;
    padding-top: 20px;
    overflow-y: auto;
  }

  .modal-window {
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    margin: 0 auto;
    width: 500px;
  }

  .modal-window .modal-window-header {
    padding: 20px;
  }

  .modal-window .modal-window-body {
    padding: 0 20px 20px 20px;
  }

  .modal-window-body--horizontal {
    flex-direction: column;
  }

  .modal-window-body--horizontal .modal-window-body__left,
  .modal-window-body--horizontal .modal-window-body__right {
    width: 100%;
    min-width: auto;
  }

  .map.vpz {
    width: 440px;
    min-height: 440px;
  }

  .modal-window-body__5post {
    height: 440px;
  }

  .fivepost-details {
    flex-direction: column;
  }

  .fivepost-details .fivepost-info,
  .fivepost-details .fivepost-button {
    width: 100%;
    min-width: auto;
  }
}

@media (max-width: 360px) {
  .modal-overlay {
    align-items: flex-end;
    background-color: rgba(0, 0, 0, 0.7);
    transition: background-color 0.3s ease;
    overflow-y: unset;
  }

  .modal-window__handle-wrapper {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: -10px;
    z-index: 1004;
    will-change: transform;
    transform: translateY(0);
    filter: drop-shadow(0 -4px 20px rgba(0, 0, 0, 0.15));
  }

  .modal-window {
    position: relative;
    width: 100%;
    max-width: 100%;
    max-height: 90vh;
    margin: 0;
    border-radius: 20px 20px 0 0;
    background-color: #ffffff;
    box-shadow: none;
    transform: translateY(0);
    overflow-y: auto;
  }

  .modal-window__handle {
    position: relative;
    top: -10px;
    width: 60px;
    height: 6px;
    background-color: #ffffff;
    border-radius: 10px;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.2), 0 2px 4px rgba(0, 0, 0, 0.1);
    z-index: 1005;
    cursor: pointer;
    margin-top: -3px;
    border: 1px solid rgba(255, 255, 255, 0.5);
  }

  .modal-overlay.closing {
    background-color: rgba(0, 0, 0, 0) !important;
  }

  .modal-overlay.closing .modal-window__handle-wrapper {
    transform: translateY(100%);
    transition: transform 0.3s ease;
  }

  .modal-close {
    display: none !important;
  }

  .modal-window .modal-window-header {
    padding: 15px 20px 15px 20px;
    font-size: 20px;
  }

  .modal-window .modal-window-body {
    padding: 0 20px 25px 20px;
  }

  .map.vpz {
    width: 100%;
    min-height: 250px;
    max-height: 300px;
  }

  .modal-window-body__5post {
    height: 328px;
  }
}


.popup_pickup_overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #000000A6;
    z-index: 10000;
    display: none;
}
  .popup_pickup {

      max-width: 500px;
      width: 100%;
      min-height: 150px;
      display: flex;
      flex-direction: column;
      padding: 30px;
      position: fixed;
      left: 50%;
      top: 50%;
      transform: translate(-50%, -50%);
      background-color: #FFFFFF;
    border-radius: 20px;
    z-index: 10010;
        display: none;
  }
  .popup_pickup_close {
    position: absolute;
        top: 20px;
        right: 20px;
        width: 20px;
        height: 20px;
        padding: 4px;
        background-image: url(/images/icons/black_cross.svg);
        background-repeat: no-repeat;
        background-position: center;
        cursor: pointer;
        z-index: 10020;
  }
  .popup_pickup_title {
    font-family: "Golos Text", Montserrat, sans-serif;
    font-size: 22px;
    font-weight: 600;
    line-height: 26px;
    color: #000000;
  }
    .popup_pickup_subtitle {
    font-family: "Golos Text", Montserrat, sans-serif;
    font-size: 14px;
    font-weight: 400;
    line-height: 17px;
    color: #000000;
    margin-top: 10px;
  }
  .popup_pickup_buttons {
    font-family: "Golos Text", Montserrat, sans-serif;
    font-size: 14px;
    font-weight: 400;
    line-height: 17px;
    color: #000000;
    display: flex;
    margin-top: 20px;
    height: 44px;
    max-width: 440px;
    width: 100%;
  }
    .popup_pickup_takeaway {
    font-family: "Golos Text", Montserrat, sans-serif;
    font-size: 14px;
    font-weight: 400;
    line-height: 17px;
    color: #000000;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 44px;
    max-width: 220px;
    width: 100%;
    border-radius: 8px 0 0 8px;
    border: 1px solid ;
    border-color: #DADADA;
    cursor: pointer;
  }
    .popup_pickup_attable {
    font-family: "Golos Text", Montserrat, sans-serif;
    font-size: 14px;
    font-weight: 400;
    line-height: 17px;
    color: #000000;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 44px;
    max-width: 220px;
    width: 100%;
    border-radius: 0 8px 8px 0;
    border: 1px solid ;
    border-color: #DADADA;
    cursor: pointer;
  }

  .popup_pickup_buttons_active {
    background-color: #008C3A;
    color: #FFFFFF;
    border: 0;
  }


  .popup_pickup_subtitle:empty {
    display: none;
}
.popup_pickup_takeaway, .popup_pickup_attable {
    transition: all 0.2s ease;
}

  