/* Стили ограничены контейнером компонента */
.popup-component,
.popup-component * {
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.popup-component {
    font-size: 14px;
    line-height: 1.5;
    color: #333;
}

.popup-component .demo {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.popup-component .demo__button {
    padding: 12px 24px;
    background: #0056A6;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.3s ease;
}

.popup-component .demo__button:hover {
    background: #004080;
}

.popup-component .demo__button:active {
    transform: translateY(1px);
}

.popup-component .popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.popup-component .popup-overlay--active {
    opacity: 1;
    visibility: visible;
}

.popup-component .popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    width: 90%;
    max-width: 760px;
    max-height: 90vh;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
}

.popup-component .popup--active {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

.popup-component .popup__container {
    max-height: 90vh;
    overflow-y: auto;
    padding: 40px 30px;
}

.popup-component .popup__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    /*margin-bottom: 20px;*/
}

.popup-component .popup__title {
    color: #0056A6;
    font-family: Inter;
    font-size: 27px;
    font-style: normal;
    font-weight: 700;
    line-height: normal;
    letter-spacing: -0.32px;
    margin: 0 0 20px 0;
}

.popup-component .popup__close {
    background: unset;
    border: none;
    position: absolute;
    top: -20px;
    right: -20px;
    cursor: pointer;
    stroke: #FFF;
    filter: drop-shadow(0 3.571px 8.929px rgba(0, 0, 0, 0.25));
}
.popup-component .popup__close svg {
    width: 50px;
    height: 50px;
}
.popup-component .popup__close:hover {
    background: unset;
}

.popup-component .popup__close-icon {
    width: 24px;
    height: 24px;
}

.popup-component .form__group {
    margin-bottom: 20px;
}

.popup-component .form__group--half {
    width: calc(50% - 10px);
}

.popup-component .form__row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.popup-component .form__label {
    display: block;
    margin-bottom: 8px;
    color: #B2B2B2;
    font-family: Inter;
    font-size: 18px;
    font-style: normal;
    font-weight: 500;
    line-height: normal;
    text-transform: uppercase;
}

.popup-component .form__required {
    color: #E31E24;
}

.popup-component .form__input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #4C4C4C;
    border-radius: 4px;
    font-size: 14px;
    color: #333;
    transition: border-color 0.3s ease;
}

.popup-component .form__input:focus {
    outline: none;
    border-color: #0056A6;
}

.popup-component .form__input--disabled {
    background: #E8E8E8;
    cursor: not-allowed;
    font-weight: 700;
}

.popup-component .form__input::placeholder {
    color: #999;
}

.popup-component .filters {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.popup-component .filters__item {
    display: flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
}

.popup-component .filters__checkbox {
    width: 20px;
    height: 20px;
    margin-right: 8px;
    cursor: pointer;
    accent-color: #0056A6;
}

.popup-component .filters__label {
    color: #4C4C4C;
    font-family: Inter;
    font-size: 15px;
    font-style: normal;
    font-weight: 400;
    line-height: normal;
}

.popup-component .tabs {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
    justify-content: end;
}

.popup-component .tabs__button {
    padding: 0px 0;
    background: none;
    border: none;
    cursor: pointer;
    position: relative;
    transition: color 0.3s ease;
    color: #4C4C4C !important;
    font-family: Inter;
    font-size: 15px;
    font-style: normal;
    font-weight: 700 !important;
    line-height: normal;
}

.popup-component .tabs__button--active {
    color: var(--link-accent-button, #084781) !important;
    font-family: Inter;
    font-size: 15px;
    font-style: normal;
    font-weight: 700;
    line-height: normal;
}

.popup-component .tabs__button--active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    border-bottom: 2px dotted #0056A6;
}

.popup-component .tabs__button:hover {
    color: #0056A6;
}

.popup-component .search {
    position: relative;
    margin: 0 0 20px 0;
    min-width: auto;
    margin-left: 0;
}

.popup-component .search__input {
    width: 100%;
    padding: 12px 50px 12px 16px;
    border: 1px solid #0E76BC;
    border-radius: 5px;
    font-size: 14px;
    color: #333;
}

.popup-component .search__input::placeholder {
    color: #999;
}

.popup-component .search__input:focus {
    outline: none;
    border-color: #004080;
}

.popup-component .search__button {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #0056A6;
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.popup-component .search__button:hover {
    color: #004080;
}

.popup-component .search__icon {
    width: 20px;
    height: 20px;
}

.popup-component .content-tab {
    display: none;
}

.popup-component .content-tab--active {
    display: block;
}

.popup-component .yandex-map {
    width: 100%;
    height: 400px;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 20px;
}

.popup-component .pharmacy-list {
    max-height: 400px;
    overflow-y: auto;
    margin-bottom: 20px;
    border: 1px solid #E8E8E8;
    border-radius: 4px;
}

.popup-component .pharmacy-item {
    padding: 16px;
    border-bottom: 1px solid #E8E8E8;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: background 0.2s ease;
}

.popup-component .pharmacy-item:last-child {
    border-bottom: none;
}

.popup-component .pharmacy-item:hover {
    background: #F5F9FC;
}

.popup-component .pharmacy-item--selected {
    background: #E8F2FA;
}

.popup-component .pharmacy-item__content {
    flex: 1;
}
.phone-link {
    text-decoration: none;
    font-family: Inter;
}
.popup-component .pharmacy-item__header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
}

.popup-component .pharmacy-item__icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
}

.popup-component .pharmacy-item__icon svg {
    width: 100%;
    height: 100%;
}

.popup-component .pharmacy-item__name {
    font-size: 16px;
    font-weight: 500;
    color: #0056A6;
    font-family: Inter;
}
.popup-component .form__link, .popup-component .privacy__link {
    background: none !important;
}
.popup-component .pharmacy-item__info {
    display: flex;
    /*gap: 30px;*/
    margin-bottom: 4px;
}


.popup-component .pharmacy-item__detail {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    justify-content: start;
    flex: 2;
}
.popup-component .pharmacy-item__detail.first {
    width: 32%;
    margin-right: 20px;
    flex: 1;
}
.popup-component .pharmacy-item__detail-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    margin-top: 2px;
}

.popup-component .pharmacy-item__detail-text {
    font-size: 14px;
    color: #333;
    font-family: Inter;
}

.popup-component .pharmacy-item__address {
    font-weight: 500;
    text-align: left;
}

.popup-component .pharmacy-item__hours {
    color: #666;
}

.popup-component .pharmacy-item__hours-weekend {
    color: #E31E24;
    font-family: Inter;
}

.popup-component .pharmacy-item__status {
    display: block;
    font-size: 12px;
    margin-top: 2px;
}

.popup-component .pharmacy-item__status--open {
    color: #28A745;
}

.popup-component .pharmacy-item__status--closed {
    color: #E31E24;
}

.popup-component .pharmacy-item__button {
    padding: 10px 24px;
    background: #0056A6;

    border: none;
    border-radius: 4px;

    cursor: pointer;
    transition: background 0.3s ease;
    white-space: nowrap;

    color: #FFF;
    text-align: center;
    font-family: Inter;
    font-size: 14px;
    font-style: normal;
    font-weight: 400;
    line-height: 20px; /* 142.857% */
    letter-spacing: -0.14px;
}

.popup-component .pharmacy-item__button:hover {
    background: #004080;
}

.popup-component .file-upload {
    margin-bottom: 20px;
    display: flex;
    gap: 15px;
}

.popup-component .file-upload__label {
    display: block;
    font-size: 12px;
    font-weight: 400;
    color: #0056A6;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    cursor: pointer;
}

.popup-component .file-upload__note {
    text-transform: none;
    color: #949494;
    font-family: Inter;
    font-size: 15px;
    font-style: normal;
    font-weight: 400;
    line-height: normal;
}

.popup-component .file-upload__area {
    position: relative;
    /*display: none;*/
}
.add_file_text {
    color: #084781;
    font-family: Inter;
    font-size: 18px;
    font-style: normal;
    font-weight: 500;
    line-height: normal;
    text-decoration-line: underline;
    text-decoration-style: solid;
    text-decoration-skip-ink: none;
    text-decoration-thickness: auto;
    text-underline-offset: auto;
    text-underline-position: from-font;
    text-transform: uppercase;
}
.popup-component .file-upload__area:hover {
    border-color: #0056A6;
}

.popup-component .file-upload__input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    overflow: hidden;
    pointer-events: none;
}

.popup-component .file-upload__placeholder {
    display: block;
    color: #4C4C4C;
    font-family: Inter;
    font-size: 15px;
    font-style: italic;
    font-weight: 400;
    line-height: normal;
}

.popup-component .file-upload__placeholder--selected {
    color: #333;
}

.popup-component .form__instructions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.popup-component .form__info-icon {
    flex-shrink: 0;
}

.popup-component .form__link {
    text-decoration: underline;
    transition: color 0.3s ease;
    color: #0E76BC;
    font-family: Inter;
    font-size: 15px;
    font-style: normal;
    font-weight: 400;
    line-height: normal;
    text-decoration-line: underline;
    text-decoration-style: solid;
    text-decoration-skip-ink: auto;
    text-decoration-thickness: auto;
    text-underline-offset: auto;
    text-underline-position: from-font;
}

.popup-component .form__link:hover {
    color: #004080;
}

.popup-component .privacy {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    margin-bottom: 15px;
}

.popup-component .privacy__checkbox {
    width: 20px;
    height: 20px;
    margin-right: 10px;
    margin-top: 2px;
    cursor: pointer;
    accent-color: #0056A6;
    flex-shrink: 0;
}

.popup-component .privacy__label {
    color: #4C4C4C;
    font-family: Inter;
    font-size: 15px;
    font-style: normal;
    font-weight: 400;
    line-height: normal;
}

.popup-component .privacy__link {
    text-decoration: underline;
    transition: color 0.3s ease;
    color: #0E76BC;
    font-family: Inter;
    font-size: 15px;
    font-style: normal;
    font-weight: 400;
    line-height: normal;
    text-decoration-line: underline;
    text-decoration-style: solid;
    text-decoration-skip-ink: auto;
    text-decoration-thickness: auto;
    text-underline-offset: auto;
    text-underline-position: from-font;
}

.popup-component .privacy__link:hover {
    color: #004080;
}

.popup-component .form__notice {
    color: #4C4C4C;
    font-family: Inter;
    font-size: 15px;
    font-style: italic;
    font-weight: 400;
    line-height: normal;
}
.popup-component .form__submit:hover {
    background: #004080;
}

.popup-component .form__submit:disabled {
    background: #999;
    cursor: not-allowed;
}
.popup-component .form__submit {
    width: 100%;
    max-width: 360px;
    padding: 16px 32px;
    background: #0056A6;

    border: none;
    border-radius: 4px;

    cursor: pointer;
    transition: background 0.3s ease;
    color: #FFF;
    text-align: center;
    font-family: Inter;
    font-size: 18px;
    font-style: normal;
    font-weight: 700;
    line-height: normal;
}
.filters_tabs {
    display: flex;
    flex-flow: row;
    align-items: flex-start;
    justify-content: space-between;
}

@media (max-width: 768px) {
    .filters_tabs {
        flex-flow: column;
    }
    .popup-component .popup {
        width: 95%;
        max-height: 95vh;
    }

    .popup-component .popup__container {
        padding: 24px;
    }

    .popup-component .popup__title {

        font-family: Inter;
        font-size: 24px;
        font-style: normal;
        font-weight: 700;
        line-height: normal;
        letter-spacing: -0.32px;
    }

    .popup-component .form__row {
        flex-direction: column;
        gap: 0;
    }

    .popup-component .form__group--half {
        width: 100%;
    }

    .popup-component .filters {
        flex-direction: column;
        gap: 12px;
    }

    .popup-component .pharmacy-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .popup-component .pharmacy-item__info {
        flex-direction: column;
        gap: 8px;
        /*margin-bottom: 4px;*/
    }

    .popup-component .pharmacy-item__button {
        width: 100%;
    }

    .popup-component .yandex-map {
        height: 300px;
    }

    .popup-component .pharmacy-list {
        max-height: 300px;
    }
}

.popup-component .pharmacy-list::-webkit-scrollbar,
.popup-component .popup__container::-webkit-scrollbar {
    width: 8px;
}

.popup-component .pharmacy-list::-webkit-scrollbar-track,
.popup-component .popup__container::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.popup-component .pharmacy-list::-webkit-scrollbar-thumb,
.popup-component .popup__container::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.popup-component .pharmacy-list::-webkit-scrollbar-thumb:hover,
.popup-component .popup__container::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Стили для баллунов Яндекс.Карт в компоненте */
.popup-component ymaps[class*="balloon_layout_panel"] {
    display: block !important;
}

.popup-component ymaps[class*="balloon_layout_normal"] {
    display: block !important;
}

.popup-component ymaps[class*="balloon__content"] {
    padding: 16px !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif !important;
}

.popup-component ymaps[class*="balloon__content"] p {
    margin: 8px 0;
    font-size: 14px;
    line-height: 1.5;
    color: #333;
}

.popup-component ymaps[class*="balloon__content"] strong {
    font-weight: 600;
    color: #0056A6;
    font-size: 16px;
}

/* Стили для структуры баллунов как в шаблоне map */
.popup-component .stores-list-map {
    font-family: var(--primary-font-family, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif);
}

.popup-component .stores-list.stores-list-map {
    display: flex;
    flex-direction: column;
    gap: 9px;
    font-size: 14px;
    letter-spacing: -0.02em;
}

.popup-component .stores-list-map .itName.address-name {
    font-weight: 700;
    line-height: 0.75;
    color: #333;
    font-size: 16px;
    margin-bottom: 4px;
    font-family: Inter;
}

.popup-component .stores-list-map .map-link {
    font-weight: 500;
    line-height: 1.2;
    opacity: 0.8;
    color: #333;
}

.popup-component .stores-list-map .map-link.address {
    font-weight: 500;
    font-family: Inter;
}

.popup-component .stores-list-map .map-link.phone {
    font-weight: 500;
    font-family: Inter;
}

.popup-component .stores-list-map .map-link.phone a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
    font-family: Inter;
}

.popup-component .stores-list-map .map-link.phone a:hover {
    color: #0056A6;
}

.popup-component .stores-list-map .map-link.schedule {
    font-weight: 500;
    line-height: 1.2;
    font-family: Inter;
}

.popup-component .stores-list-map .pharmacy-item__hours-weekend {
    color: #E31E24;
    font-family: Inter;
}

.popup-component .stores-list-map .map_list__buttons {
    margin-top: 8px;
    font-family: Inter;
}

.popup-component .stores-list-map .map_list__buttons .balloon-select-btn {
    width: 100%;
    padding: 6px 16px;
    background: #0056A6;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 400;
    cursor: pointer;
    transition: background 0.3s ease;
    -webkit-tap-highlight-color: rgba(0,0,0,0.1);
    touch-action: manipulation;
    margin-top: 0;
    font-family: Inter;
}

.popup-component .stores-list-map .map_list__buttons .balloon-select-btn:hover {
    background: #004080;
}

.popup-component .stores-list-map .map_list__buttons .balloon-select-btn:active {
    transform: translateY(1px);
}

.popup-component ymaps[class*="balloon__content"] .balloon-select-btn {
    width: 100%;
    margin-top: 12px;
}

@media (max-width: 768px) {
    .popup-component ymaps[class*="balloon_layout_panel"] {
        display: block !important;
        max-width: 90vw !important;
    }
    
    .popup-component ymaps[class*="balloon_layout_normal"] {
        display: block !important;
        max-width: 90vw !important;
    }
    .popup-component .pharmacy-item__detail.first {
        width: 100%;
    }
    .stores-list-map .map-link {
        margin-bottom: 0;
        max-width: 250px;
    }
    .popup-component .stores-list.stores-list-map {
        gap: 0;
    }
}

/* Стили для сообщения об успехе */
.popup-component .popup__success {
    display: flex;
    align-items: center;
    justify-content: center;
    /*min-height: 300px;*/
    /*padding: 40px 20px;*/
}

.popup-component .popup__success-content {
    text-align: center;
    max-width: 400px;
}

.popup-component .popup__success-icon {
    margin: 0 auto 24px;
    display: block;
}

.popup-component .popup__success-title {
    font-size: 24px;
    font-weight: 600;
    color: #0056A6;
    margin: 0 0 16px;
    line-height: 1.3;
}

.popup-component .popup__success-text {
    font-size: 18px;
    color: #333;
    margin: 0;
    line-height: 1.5;
}

.popup-component .popup__success-order-id {
    font-weight: 700;
    color: #0056A6;
    font-size: 20px;
}

@media (max-width: 768px) {
    .popup-component .popup__success {
        min-height: 250px;
        padding: 30px 20px;
    }

    .popup-component .popup__success-title {
        font-size: 20px;
    }

    .popup-component .popup__success-text {
        font-size: 16px;
    }

    .popup-component .popup__success-order-id {
        font-size: 18px;
    }
}

.popup-component .pharmacy-item--selected .pharmacy-item__button{
    background: #039e00;
}
.popup-component .form__required {
    font-size: 18px !important;
}