/*
Theme Name: Interactive Map
Theme URI: 
Author: Your Name
Author URI: 
Description: A custom WordPress theme featuring an interactive map using Leaflet
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: interactive-map
*/

:root {
    /* Primary colors */
    --color-primary: #c4b570;  /* orange */
    /* marker color */
    --color-marker: rgba(255, 140, 0, 1);
    
    --color-white: #ffffff;
    --color-black: #000000;
    
    /* Text colors */
    --color-text-primary: #202124;
    --color-text-secondary: #5f6368;
    
    /* UI colors */
    --color-border: #e0e0e0;
    --color-background: #ffffff;
    --color-hover: #f8f9fa;
    --color-active: #e8f0fe;
    --color-active-border: #1a73e8;
    
    /* Shadow */
    --shadow-default: 0 2px 6px rgba(0, 0, 0, 0.3);
}

/* Base styles */
body, html {
    margin: 0 !important;
    padding: 0 !important;
    height: 100%;
    width: 100%;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

/* Layout */
.site-header, .site-footer, .leaflet-control-attribution {
    display: none !important;
}

.main-container {
    position: relative;
    height: 100%;
    width: 100%;
}

#wpadminbar {
    position: fixed !important;
    top: 0;
    left: 25%;
    width: 50%;
}

/* Sidebar */
.sidebar {
    position: absolute;
    left: 0;
    top: 0;
    width: 320px;
    height: 100%;
    background: white;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
}

.sidebar-header {
    padding: 20px 24px 16px;
    border-bottom: 1px solid #e0e0e0;
    background: white;
    flex-shrink: 0;
}

.sidebar-header h2 {
    margin: 0;
    font-size: 20px;
    color: #202124;
    font-weight: 400;
    line-height: 1.4;
}

.sidebar-content {
    overflow-y: auto;
    height: 100%;
}

/* List styles */
.list-group {
    padding: 0;
    margin: 0;
    list-style: none;
}

.list-group-item {
    padding: 16px 24px;
    border-bottom: 1px solid #e0e0e0;
    cursor: pointer;
    transition: background-color 0.2s;
    text-decoration: none;
    color: inherit;
    display: block;
}

.list-group-item:hover {
    background-color: #f8f9fa;
}

.list-group-item.active {
    background-color: #e8f0fe;
    color: #1a73e8;
    border-left: 3px solid #1a73e8;
}

.list-group-item h5 {
    margin: 0 0 4px;
    font-size: 16px;
    font-weight: 500;
    color: #202124;
}

.list-group-item small {
    color: #5f6368;
    font-size: 13px;
    display: block;
    margin-top: 2px;
}

/* Map container */
.map-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

#map {
    height: 100%;
    width: 100%;
}

/* Controls and buttons */
.project-info {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    gap: 10px;
}

.about-project-btn,
.language-btn {
    background: white;
    border: none;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
    cursor: pointer;
    transition: all 0.2s ease;
    color: #000;
}

.language-btn {
    width: 60px !important;
    height: 40px !important;
    padding: 4px;
    background-color: var(--color-white);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.language-btn .flag-img {
    width: 50px;
    height: 32px;
    object-fit: cover;
    border-radius: 6px;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.1);
}



.about-project-btn {
    padding: 0;
    margin: 0;
}

.about-project-btn-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    max-width: 100px;
}

.about-project-btn:hover,
.language-btn:hover {
    /* background-color: var(--color-primary); */
    color: var(--color-black);
}

/* Custom zoom controls */
.custom-zoom-controls {
    position: absolute;
    bottom: 10px;
    right: 10px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
}

.zoom-in-btn,
.zoom-out-btn {
    width: 40px;
    height: 40px;
    background: white;
    border: none;
    cursor: pointer;
    font-size: 18px;
    font-weight: bold;
    color: #000;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.zoom-in-btn {
    border-radius: 4px 4px 0 0;
    border-bottom: 1px solid #ddd;
}

.zoom-out-btn {
    border-radius: 0 0 4px 4px;
}

.zoom-in-btn:hover,
.zoom-out-btn:hover {
    /* background-color: var(--color-primary); */
    color: var(--color-black);
}

/* Language content visibility */
.wp-block-interactive-map-content-lt,
.wp-block-interactive-map-content-pl,
.wp-block-interactive-map-content-en,
.title-lt, .title-pl, .title-en,
.desc-lt, .desc-pl, .desc-en {
    display: none !important;
}

[data-language="LT"] .wp-block-interactive-map-content-lt,
[data-language="PL"] .wp-block-interactive-map-content-pl,
[data-language="EN"] .wp-block-interactive-map-content-en {
    display: block !important;
    overflow-y: hidden;
    padding-left: 20px;
    padding-right: 20px;
}

[data-language="LT"] .title-lt,
[data-language="LT"] .desc-lt,
[data-language="PL"] .title-pl,
[data-language="PL"] .desc-pl,
[data-language="EN"] .title-en,
[data-language="EN"] .desc-en {
    display: inline !important;
}

/* Content containers */
.content-container {
    display: none;
    padding: 0;
    border-bottom: 1px solid #e0e0e0;
    height: 100%;
}

.content-container-about-project {
    display: block;
    padding: 0;
    border-bottom: 1px solid #e0e0e0;
    height: 100%;
}

.content-container img {
    max-width: 100%;
    height: auto;
    margin: 10px 0;
}

.content-container h1,
.content-container h2,
.content-container h3,
.content-container h4,
.content-container h5,
.content-container h6 {
    margin-top: 0;
    color: #202124;
}

.content-container p {
    margin-bottom: 10px;
    color: #5f6368;
    line-height: 1.5;
}

/* Location header */
.location-header {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    margin-bottom: 0;
    border-bottom: 1px solid #e0e0e0;
    background: white;
    position: sticky;
    top: 0;
    z-index: 1;
}

.location-header h3 {
    margin: 0;
    font-size: 1.2em;
    color: #202124;
}

.to-google-maps-gps {
    text-decoration: none;
    color: #000;
    font-size: 1.2em;
    padding-left: 10px;
    padding-right: 10px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 35px;
    height: 35px;
}

.to-google-maps-gps:hover {
    color: var(--color-primary);
}

.gps-coordinates{
    display: none !important;
}

/* Gallery styles */
.image-gallery {
    width: 100%;
    height: 300px;
    margin-bottom: 20px;
    position: relative;
}

.swiper {
    height: 300px;
    width: 100%;
}

.swiper-wrapper {
    height: 100%;
    display: flex;
    align-items: center;
}

.swiper-slide {
    text-align: center;
    background: #fff;
    display: flex !important;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    height: 300px;
    width: 100%;
}

.swiper-slide img {
    max-width: 100%;
    max-height: 260px;
    width: 100%;
    width: calc(100% - 60px);
    height: auto;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}

.swiper-button-next,
.swiper-button-prev {
    color: rgba(0, 0, 0, 0.5) !important;
}
.swiper-button-next{
    right: 0 !important;
}
.swiper-button-prev{
    left: 0 !important;
}
.swiper-button-next:after{
    font-size: 25px !important;
}
.swiper-button-prev:after{
    font-size: 25px !important;
}


.swiper-pagination {
    display: none !important;
}

.gallery-item-text {
    justify-self: center;
    margin-top: 10px;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.1);
    color: #000;
    padding: 5px;
    border-radius: 5px;
    text-align: center;
    z-index: 1;
    
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-items {
    display: none !important;
}

/* Map markers */
.custom-map-marker {
    background: none;
    border: none;
}

.marker-inner {
    width: 30px;
    height: 30px;
    background: rgba(255, 255, 255, 0.5);
    border: 2.5px solid white;
    border-radius: 50%;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

/* Remove default focus styles */
.marker-inner:focus {
    outline: none;
}

.marker-inner i {
    color: #000;
    font-size: 16px;
    transition: color 0.2s ease;
    pointer-events: none; /* Ensure icon doesn't interfere with clicks */
}

.marker-inner.selected {
    border-color: var(--color-marker);
    background: rgba(255, 255, 255, 0.8);
}

.marker-inner.selected i {
    color: var(--color-marker);
}

/* Hover effect */
.marker-inner:hover {
    background: rgba(255, 255, 255, 0.8);
    transform: scale(1.05);
}

/* About project images */
.about-project-images {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 0;
}

.about-project-images .wp-block-column figure {
    margin: unset !important;
}

.about-project-images img {
    max-width: 200px;
    height: auto;
    object-fit: contain;
}

/* Sidebar toggle button */
.sidebar-toggle-btn {
    display: none !important;
    position: absolute;
    top: -20px;
    right: 20px;
    z-index: 1000;
    background-color: white;
    border: none;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
    transition: all 0.2s ease;
    color: #000;
}

.sidebar-toggle-btn:hover {
    /* background-color: var(--color-primary); */
    color: var(--color-black);
}

.sidebar-toggle-btn i {
    transition: transform 0.3s ease;
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Scrollbar styling */
.sidebar-content::-webkit-scrollbar,
.wp-block-interactive-map-content-lt::-webkit-scrollbar,
.wp-block-interactive-map-content-pl::-webkit-scrollbar,
.wp-block-interactive-map-content-en::-webkit-scrollbar {
    width: 6px;
}

.sidebar-content::-webkit-scrollbar-track,
.wp-block-interactive-map-content-lt::-webkit-scrollbar-track,
.wp-block-interactive-map-content-pl::-webkit-scrollbar-track,
.wp-block-interactive-map-content-en::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.sidebar-content::-webkit-scrollbar-thumb,
.wp-block-interactive-map-content-lt::-webkit-scrollbar-thumb,
.wp-block-interactive-map-content-pl::-webkit-scrollbar-thumb,
.wp-block-interactive-map-content-en::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.sidebar-content::-webkit-scrollbar-thumb:hover,
.wp-block-interactive-map-content-lt::-webkit-scrollbar-thumb:hover,
.wp-block-interactive-map-content-pl::-webkit-scrollbar-thumb:hover,
.wp-block-interactive-map-content-en::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Mobile styles */
@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        height: 100%;
        position: fixed;
        top: 0;
        bottom: 0;
        transform: translateY(75%);
        transition: transform 0.3s ease;
    }

    .sidebar.expanded {
        transform: translateY(15%);
    }

    .sidebar .sidebar-content .list-group .content-container {
        padding-bottom: 20%;
    }

    .sidebar.expanded .sidebar-content .list-group .content-container {
        padding-bottom: 30%;
    }

    .sidebar .sidebar-content {
        overflow-y: hidden;
    }
    
    .sidebar.expanded .sidebar-content {
        overflow-y: auto;
    }

    .sidebar-toggle-btn {
        display: flex !important;
    }

    .sidebar-toggle-btn i {
        width: 100%;
        height: 100%;
        object-fit: contain;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* Remove the transform rotation */
    .sidebar.expanded .sidebar-toggle-btn i {
        transform: none;
    }

    /* The icon class changes will be handled by JavaScript */

    .sidebar-header {
        padding: 16px 20px 12px;
    }
    
    .sidebar-header h2 {
        font-size: 18px;
    }
    
    .list-group-item {
        padding: 12px 20px;
    }

    .content-container.active {
        display: block !important;
    }

    .content-container.active .content-lt,
    .content-container.active .content-pl,
    .content-container.active .content-en {
        height: 100%;
        overflow-y: auto;
    }

    .content-container-about-project [class^="wp-block-interactive-map-content-"] {
        height: 100%;
        overflow-y: auto;
    }
    
    .project-info {
        flex-direction: column;
        gap: 8px;
    }
    .about-project-btn{
        position: fixed;
        left: 20px;
        top: 10px;
    }

    .about-project-btn-img {
       
        max-width: 60px;
    }

    .language-btn {
        width: 60px !important;
        height: 40px !important;
    }

    .custom-zoom-controls {
        display: none !important;
    }

    .location-header {
        touch-action: pan-x;
    }

    .sidebar-content {
        height: 100%;
        overflow-y: auto;
    }

    [data-language] [class^="wp-block-interactive-map-content-"] {
        height: 150%;
        overflow-y: auto;
    }
}

@media screen and (max-width: 782px) {
    html #wpadminbar {
        display: none !important;
    }
}

