/* yandex-map.css */

#show-map-button{
    align-self: center;
    margin-left: auto;
    margin-right: auto;
    height: 30px;
    width: 150px;
    padding: 5px 10px;
    border: 1px solid #ccc;
    background-color: #FDFDFE;
    cursor: pointer;
}

.map-hidden{
    display: none;
    width: 0px;
}

.map-smol{
    background-image: url('https://sevon-development.ru/wp-content/uploads/2025/03/map-image.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    width: 100%;
    height: 100px;
}

#toggle-fullscreen {
    position: absolute;
    top: 10px;
    right: 10px !important;
    z-index: 1000;
    padding: 5px 10px;
    background: #fff;
    border: 1px solid #ccc;
    cursor: pointer;
}

.map-wrapper.fullscreen {
    position: relative;
    top: 0;
    left: 0;
    height: 95vh;
    z-index: 1000;
    background: #FDFDFE;
    padding: 0;
    margin: 0;
}


.map-wrapper.fullscreen #toggle-fullscreen {
    right: calc(25% + 20px);
}

.map-wrapper.fullscreen .preview-content {
    height: 100%;
}

.fullscreen .preview-content{
    padding-top: 15px;
}

.map-wrapper {
    display: flex;
    gap: 20px;
    font-family: var(--e-global-typography-ltext1-font-family);
    font-size: var(--e-global-typography-ltext1-font-size);
    font-weight: var(--e-global-typography-ltext1-font-weight);
    line-height: var(--e-global-typography-ltext1-line-height);
    letter-spacing: var(--e-global-typography-ltext1-letter-spacing);
    text-transform: var(--e-global-typography-ltext1-text-transform);
    font-style: var(--e-global-typography-ltext1-font-style);
}

.preview-content {
    display: none;
    flex-direction: column;
    align-items: center;
    animation: fadeIn 0.3s ease-in-out;
    height: 400px;
    overflow: auto;
}

.previewContent-list{
    height: 100%;
    list-style: none; padding: 0;
}

.empty-state {
    color: #666;
    text-align: center;
    padding: 50px 20px;
    font-style: italic;
}

.map-wrapper.fullscreen #map-container {
    width: 100%;
    height: 100%;
}

/* Ширина окна браузера больше или равна 1300px. */
@media screen and (min-width: 1300px) {
    #map-container {
        height: 420px;
        width: 75%;
        position: relative;
    }
    

    #map-sidebar {
        width: 25%;
        padding: 5px;
        background: #FDFDFE;
        box-shadow: 0 0 10px rgba(0,0,0,0.1);
        border-radius: 10px;
        overflow: hidden;
    }

    .map-wrapper.fullscreen #map-sidebar {
        position: absolute;
        top: 0;
        height: 100%;
        width: 25%;
        background: #FDFDFE;
        box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
        z-index: 1100;
    }

    .previewContent-element{
        margin-bottom: 10px;
        padding: 5px;
        display: flex;
        border-radius: 8px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
        margin-bottom: 15px;
    }
}

/* Ширина окна браузера меньше или равна 1300px. */
@media screen and (max-width: 1300px) {
    #map-container {
        height: 420px;
        width: 70%;
        position: relative;
    }
    

    #map-sidebar {
        width: 30%;
        padding: 5px;
        background: #FDFDFE;
        box-shadow: 0 0 10px rgba(0,0,0,0.1);
        border-radius: 10px;
        overflow: hidden;
    }

    .map-wrapper.fullscreen #map-sidebar {
        position: absolute;
        top: 0;
        height: 100%;
        width: 25%;
        background: #FDFDFE;
        box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
        z-index: 1100;
    }

    .previewContent-element{
        margin-bottom: 10px;
        padding: 5px;
        display: flex;
        border-radius: 8px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
        margin-bottom: 15px;
    }
}


/* Ширина окна браузера меньше или равна 1024px. */
@media screen and (max-width: 1024px) {
    #map-container {
        height: 160px;
        width: 100%;
        position: relative;
    }
    

    #map-sidebar {
        display: none !important;
    }

    .map-wrapper.fullscreen #map-sidebar {
        display: block !important; 
        position: absolute;
        top: auto;
        bottom: 0;
        height: 35%;
        width: 100%;
        background: #fff;
        box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
        z-index: 1100;
    }
    

    .previewContent-element{
        margin-bottom: 15px;
        display: flex;
        height: 90%;
        border-radius: 8px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
        margin-bottom: 15px;
    }
}

.swiper-container {
    position: relative;
    width: 100%;
    max-width: 400px;
    border-radius: 8px;
    overflow: hidden;
}

.swiper-wrapper {
    display: flex;
    transition-timing-function: ease-in-out;
    height: 100%;
}

.swiper-slide {
    flex-shrink: 0;
    width: 100%;
    position: relative;
}

.swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.swiper-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    border: none;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.swiper-button:hover {
    background: white;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.swiper-button::after {
    content: '';
    display: block;
    width: 10px;
    height: 10px;
    border-style: solid;
    border-color: #333;
}

.swiper-button-prev {
    left: 10px;
}

.swiper-button-prev::after {
    border-width: 2px 0 0 2px;
    transform: rotate(-45deg);
    margin-right: 2px;
}

.swiper-button-next {
    right: 10px;
}

.swiper-button-next::after {
    border-width: 2px 2px 0 0;
    transform: rotate(45deg);
    margin-left: 2px;
}


.element-inner{
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    padding-left: 10px;
    width: 100%;
}

.title {
    font-family: var(--e-global-typography-lheading3-font-family);
    font-weight: var(--e-global-typography-lheading3-font-weight);
}

.price {
    margin: 5px 0;
    color: #000;
}

.details-link {
    display: inline-block;
    padding: 5px 15px;
    background-color: #1e98ff;
    color: #fff;
    text-decoration: none;
    border-radius: 5px;
    text-align: center;
}

.details-link:hover {
    background-color: #1476c7;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}