/**
 * City Catalogue Map - Frontend Styles
 */

/* Main Canvas Wrapper */
.city-map-catalogue-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: inherit;
}

.city-map-catalogue-canvas {
    width: 100%;
    height: 520px;
    min-height: 250px;
    background-color: #e5e3df;
}

/* InfoWindow Customizations to integrate seamlessly with Elementor Styling */
.gm-style .gm-style-iw-c {
    padding: 0 !important;
    border-radius: 14px !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15) !important;
    overflow: hidden !important;
    max-height: 750px !important;
}

.gm-style .gm-style-iw-d {
    overflow-x: hidden !important;
    overflow-y: auto !important;
    padding: 0 !important;
    max-height: 750px !important;
}

/* Compact Bubble Height (When info is just title and button) */
.gm-style .gm-style-iw-c.city-map-iw-compact,
.gm-style .gm-style-iw-d.city-map-iw-compact {
    max-height: 420px !important;
}

/* Rich Bubble Height (When info has images, video, links, etc.) */
.gm-style .gm-style-iw-c.city-map-iw-rich,
.gm-style .gm-style-iw-d.city-map-iw-rich {
    max-height: 750px !important;
}

.gm-style .gm-style-iw-tc::after {
    /* InfoWindow tip pointer */
    background: #ffffff !important;
}

/* Close button on InfoWindow */
.gm-ui-hover-effect {
    top: 6px !important;
    right: 6px !important;
    width: 28px !important;
    height: 28px !important;
    background: rgba(255, 255, 255, 0.88) !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 15 !important;
    transition: background 0.2s ease, transform 0.2s ease;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
}

.gm-ui-hover-effect:hover {
    background: rgba(255, 255, 255, 1) !important;
    transform: scale(1.05);
}

.gm-ui-hover-effect > span {
    margin: 0 !important;
}

/* Popup Card Inner Structure */
.city-map-popup-card {
    box-sizing: border-box;
    font-family: inherit;
    line-height: 1.45;
    background-color: #ffffff;
    padding: 16px;
    text-align: center;
    width: 290px;
    max-width: 100%;
    max-height: 750px;
}

.city-map-popup-card.city-map-popup-compact {
    max-height: 420px;
}

/* Rich Bubble Layout Optimization (when much information is present) */
.city-map-popup-rich {
    padding: 14px 16px;
}

.city-map-popup-rich .city-map-popup-title {
    margin-bottom: 6px;
}

.city-map-popup-rich .city-map-popup-desc {
    margin-bottom: 10px;
    font-size: 13px;
    line-height: 1.45;
}

.city-map-popup-rich .city-map-carousel,
.city-map-popup-rich .city-map-popup-image {
    margin-bottom: 10px;
    height: 148px;
}

.city-map-popup-rich .city-map-popup-video,
.city-map-popup-rich .city-map-popup-video-trigger {
    margin-bottom: 10px;
}

.city-map-popup-rich .city-map-popup-buttons {
    margin-top: 10px;
}

/* Featured Image (Single) */
.city-map-popup-image {
    margin-bottom: 12px;
    overflow: hidden;
    border-radius: 8px;
    background-color: #f1f5f9;
}

.city-map-popup-image img {
    display: block;
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 8px;
    transition: transform 0.3s ease;
}

.city-map-popup-image img:hover {
    transform: scale(1.03);
}

/* Image Gallery Carousel */
.city-map-carousel {
    position: relative;
    width: 100%;
    height: 155px;
    margin-bottom: 12px;
    border-radius: 8px;
    overflow: hidden;
    background-color: #0f172a;
    user-select: none;
}

.city-map-carousel-track {
    position: relative;
    width: 100%;
    height: 100%;
}

.city-map-carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.28s ease, visibility 0.28s ease;
}

.city-map-carousel-slide.is-active {
    opacity: 1;
    visibility: visible;
}

.city-map-carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Carousel Prev & Next Navigation Buttons */
.city-map-carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    background: rgba(15, 23, 42, 0.65);
    color: #ffffff;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    padding: 0;
    transition: background-color 0.2s ease, transform 0.2s ease;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

.city-map-carousel-btn:hover {
    background: rgba(15, 23, 42, 0.9);
    transform: translateY(-50%) scale(1.1);
}

.city-map-carousel-btn svg {
    width: 15px;
    height: 15px;
    stroke: #ffffff;
}

.city-map-carousel-prev {
    left: 7px;
}

.city-map-carousel-next {
    right: 7px;
}

/* Slide Counter Badge */
.city-map-carousel-counter {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(15, 23, 42, 0.7);
    color: #ffffff;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 12px;
    z-index: 10;
    pointer-events: none;
    line-height: 1.2;
    letter-spacing: 0.3px;
}

/* Carousel Dots */
.city-map-carousel-dots {
    position: absolute;
    bottom: 8px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    z-index: 10;
}

.city-map-carousel-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.45);
    border: none;
    padding: 0;
    cursor: pointer;
    transition: all 0.2s ease;
}

.city-map-carousel-dot:hover,
.city-map-carousel-dot.is-active {
    background: #ffffff;
    transform: scale(1.35);
    box-shadow: 0 0 5px rgba(255, 255, 255, 0.8);
}

/* Thumbnail Gallery Strip */
.city-map-thumbnails-wrap {
    margin-bottom: 12px;
}

.city-map-thumbnails-wrap .city-map-popup-image {
    margin-bottom: 6px;
}

.city-map-thumbnails-strip {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding: 2px 0 6px;
    scrollbar-width: thin;
}

.city-map-thumbnails-strip::-webkit-scrollbar {
    height: 4px;
}

.city-map-thumbnails-strip::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.city-map-thumb-item {
    width: 44px;
    height: 44px;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    flex-shrink: 0;
    opacity: 0.7;
    padding: 0;
    background: #0f172a;
    transition: opacity 0.2s, border-color 0.2s;
}

.city-map-thumb-item:hover,
.city-map-thumb-item.is-active {
    opacity: 1;
    border-color: #3ba2ff;
}

.city-map-thumb-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* POI Title */
.city-map-popup-title {
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: 600;
    color: #222222;
    line-height: 1.3;
}

/* Description / Content */
.city-map-popup-desc {
    margin: 0 0 12px 0;
    font-size: 13px;
    color: #555555;
    line-height: 1.5;
    text-align: left;
}

.city-map-popup-desc p {
    margin: 0 0 8px 0;
}

.city-map-popup-desc p:last-child {
    margin-bottom: 0;
}

.city-map-popup-desc img {
    max-width: 100%;
    height: auto;
}

.city-map-popup-desc a {
    color: #3ba2ff;
    text-decoration: underline;
}

/* YouTube / Video Embed (Inline) */
.city-map-popup-video {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
    overflow: hidden;
    border-radius: 8px;
    margin-bottom: 12px;
    background: #000000;
}

.city-map-popup-video iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
    border-radius: 8px;
}

/* YouTube / Video Trigger Card (Lightbox in Page) */
.city-map-popup-video-trigger {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
    overflow: hidden;
    border-radius: 8px;
    margin-bottom: 12px;
    background-color: #0f172a;
    cursor: pointer;
    display: block;
    user-select: none;
    -webkit-user-select: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.city-map-popup-video-trigger:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}

.city-map-video-thumb {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transition: transform 0.35s ease;
}

.city-map-popup-video-trigger:hover .city-map-video-thumb {
    transform: scale(1.05);
}

.city-map-video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.15) 0%, rgba(0, 0, 0, 0.6) 100%);
    transition: background 0.2s ease;
}

.city-map-popup-video-trigger:hover .city-map-video-overlay {
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.08) 0%, rgba(0, 0, 0, 0.45) 100%);
}

.city-map-video-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 52px;
    height: 36px;
    z-index: 2;
    transition: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275), filter 0.2s ease;
    filter: drop-shadow(0 3px 8px rgba(0, 0, 0, 0.45));
}

.city-map-popup-video-trigger:hover .city-map-video-play-btn {
    transform: translate(-50%, -50%) scale(1.15);
    filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.65));
}

.city-map-play-svg {
    width: 100%;
    height: 100%;
    display: block;
}

.city-map-play-bg {
    fill: #ff0000;
    transition: fill 0.2s ease;
}

.city-map-popup-video-trigger:hover .city-map-play-bg {
    fill: #cc0000;
}

.city-map-video-badge {
    position: absolute;
    bottom: 7px;
    left: 7px;
    background: rgba(15, 23, 42, 0.82);
    color: #ffffff;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
    padding: 3px 8px;
    border-radius: 4px;
    z-index: 2;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    line-height: 1;
}

/* Video Lightbox Modal (Page Overlay) */
.city-map-video-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    box-sizing: border-box;
}

.city-map-video-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.88);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    cursor: pointer;
}

.city-map-video-modal-dialog {
    position: relative;
    width: 100%;
    max-width: 860px;
    z-index: 2;
    animation: cityMapModalZoom 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes cityMapModalZoom {
    from {
        opacity: 0;
        transform: scale(0.92);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.city-map-video-modal-close {
    position: absolute;
    top: -46px;
    right: 0;
    width: 38px;
    height: 38px;
    background: rgba(255, 255, 255, 0.18);
    color: #ffffff;
    border: none;
    border-radius: 50%;
    font-size: 26px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.2s ease;
    padding: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.city-map-video-modal-close:hover {
    background: rgba(255, 255, 255, 0.38);
    transform: scale(1.08);
}

.city-map-video-modal-content {
    position: relative;
    width: 100%;
    background: #000000;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
}

.city-map-video-modal-iframe-wrap {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
}

.city-map-video-modal-iframe-wrap iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

body.city-map-video-modal-active {
    overflow: hidden;
}

/* Social Media Badges Section */
.city-map-popup-socials {
    margin: 12px 0 14px 0;
    padding-top: 10px;
    border-top: 1px dashed #e2e8f0;
}

.city-map-popup-socials-heading {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #64748b;
    margin-bottom: 8px;
}

.city-map-popup-socials-list {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
}

.city-map-social-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    text-decoration: none !important;
}

.city-map-social-btn svg {
    width: 100%;
    height: 100%;
    display: block;
    border-radius: 50%;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.12);
}

.city-map-social-btn:hover {
    transform: translateY(-2px) scale(1.08);
}

.city-map-social-btn:hover svg {
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.22);
}

/* Action Buttons Container (Stacked vertically by default) */
.city-map-popup-buttons {
    margin-top: 14px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
}

/* Base Action Button */
.city-map-popup-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 9px 18px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    text-decoration: none !important;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.22s ease-in-out;
    line-height: 1.2;
    box-sizing: border-box;
    width: 100%;
}

/* Vector icon inside button: automatically matches text color */
.city-btn-icon {
    width: 16px;
    height: 16px;
    min-width: 16px;
    display: inline-block;
    vertical-align: middle;
    flex-shrink: 0;
    stroke: currentColor;
    fill: none;
    transition: stroke 0.22s ease-in-out;
}

.city-btn-text {
    display: inline-block;
    vertical-align: middle;
}

/* Primary Button (Directions / Πλοήγηση) - Default Fallback */
.city-map-popup-btn-primary {
    border: 1px solid #3ba2ff;
    background-color: #ffffff;
    color: #207df8;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

.city-map-popup-btn-primary:hover {
    background-color: #3ba2ff;
    border-color: #3ba2ff;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(59, 162, 255, 0.35);
    transform: translateY(-1px);
}

/* Website Button (with Globe Icon) - Default Fallback */
.city-map-popup-btn-website {
    border: 1px solid #3ba2ff;
    background-color: #ffffff;
    color: #207df8;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

.city-map-popup-btn-website:hover {
    background-color: #3ba2ff;
    border-color: #3ba2ff;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(59, 162, 255, 0.35);
    transform: translateY(-1px);
}

/* Secondary Button - Default Fallback */
.city-map-popup-btn-secondary {
    border: 1px solid #d1d5db;
    background-color: #f8fafc;
    color: #334155;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.city-map-popup-btn-secondary:hover {
    background-color: #334155;
    border-color: #334155;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(51, 65, 85, 0.25);
    transform: translateY(-1px);
}
