/**
 * Globe Locations - Styles
 * Interactive globe map with custom location markers and videos
 */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.globe-locations-container {
    font-family: 'Zalando Sans SemiExpanded', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

#globe-container {
    width: 100vw;
    height: 100vh;
    position: relative;
    overflow: hidden;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.15) 0%, transparent 15%),
        radial-gradient(121.35% 68.97% at 47.74% 23.11%, rgba(0, 0, 0, 0.00) 0%, rgba(0, 0, 0, 0.7) 50%, #000 75%),
        linear-gradient(90deg, #3DDCD4 0%, #B8E129 94.45%);
}

#globe-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 40vh;
    background: linear-gradient(180deg,
        rgb(255, 255, 255) 0%,
        rgba(255, 255, 255, 0.9) 20%,
        rgba(255, 255, 255, 0.7) 35%,
        rgba(255, 255, 255, 0.4) 55%,
        rgba(255, 255, 255, 0.15) 75%,
        rgba(255, 255, 255, 0.05) 90%,
        transparent 100%);
    z-index: 100;
    pointer-events: none;
}

/* Dark gradient top option */
#globe-container[data-gradient-top="dark"]::before,
.page-id-191349 #globe-container::before {
    background: linear-gradient(180deg,
        rgb(0, 0, 0) 0%,
        rgba(0, 0, 0, 0.9) 20%,
        rgba(0, 0, 0, 0.7) 35%,
        rgba(0, 0, 0, 0.4) 55%,
        rgba(0, 0, 0, 0.15) 75%,
        rgba(0, 0, 0, 0.05) 90%,
        transparent 100%);
}

#globe-container::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 70vh;
    background: linear-gradient(0deg,
        rgb(0, 0, 0) 0%,
        rgba(0, 0, 0, 0.95) 10%,
        rgba(0, 0, 0, 0.85) 20%,
        rgba(0, 0, 0, 0.7) 35%,
        rgba(0, 0, 0, 0.4) 55%,
        rgba(0, 0, 0, 0.15) 75%,
        rgba(0, 0, 0, 0.05) 90%,
        transparent 100%);
    z-index: 100;
    pointer-events: none;
}

/* Video Recording Mode - Hide all UI controls */
body.video-mode .globe-controls,
body.video-mode .card-close,
body.video-mode .video-close,
body.video-mode .video-controls,
body.video-mode .loading {
    display: none !important;
}

#globe-canvas {
    display: block;
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
}

/* Glass morphic location markers */
.location-marker {
    position: absolute;
    display: inline-block;
    width: auto;
    padding: 6px 14px;
    border-radius: 48px;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(35px);
    -webkit-backdrop-filter: blur(35px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.5),
        inset 0 -1px 0 rgba(255, 255, 255, 0.1),
        inset 0 0 34px 17px rgba(255, 255, 255, 0.07);
    color: white;
    font-size: 13px;
    font-weight: 500;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, -50%) scale(0);
    transition: transform 0.3s ease;
    z-index: 10;
    white-space: nowrap;
    overflow: hidden;
}

.location-marker::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.8),
        transparent
    );
}

.location-marker::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 1px;
    height: 100%;
    background: linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.8),
        transparent,
        rgba(255, 255, 255, 0.3)
    );
}

.location-marker.visible {
    opacity: 1;
    pointer-events: all;
    transform: translate(-50%, -50%) scale(1);
    animation: popInMarker 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
}

.location-marker:hover {
    transform: translate(-50%, -50%) scale(1.1);
}

/* Video modal */
.video-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.95);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.video-modal.active {
    display: flex;
}

.video-modal-content {
    position: relative;
    width: 100vw;
    height: 100vh;
}

.video-modal video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: white;
    font-size: 24px;
    line-height: 1;
    padding-bottom: 2px;
    transition: all 0.3s ease;
    z-index: 10;
}

.video-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

/* Video Controls */
.video-controls {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
}

.video-play-pause {
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(35px);
    -webkit-backdrop-filter: blur(35px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: white;
    font-size: 24px;
    transition: all 0.3s ease;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.5),
        inset 0 -1px 0 rgba(255, 255, 255, 0.1),
        inset 0 0 34px 17px rgba(255, 255, 255, 0.07);
}

.video-play-pause:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.1);
}

.video-play-pause:active {
    transform: scale(0.95);
}

.video-play-pause .play-icon {
    margin-left: 2px;
}

.video-play-pause .pause-icon {
    font-size: 26px;
    margin-top: 2px;
}

/* Controls */
.globe-controls {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%) scale(0);
    opacity: 0;
    display: flex;
    gap: 20px;
    z-index: 10000;
    transition: opacity 0.3s ease;
}

.globe-controls.show {
    animation: popInButton 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
}

.globe-controls.hide {
    opacity: 0 !important;
    pointer-events: none !important;
}

.control-button {
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(35px);
    -webkit-backdrop-filter: blur(35px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.5),
        inset 0 -1px 0 rgba(255, 255, 255, 0.1),
        inset 0 0 34px 17px rgba(255, 255, 255, 0.07);
    color: white;
    font-size: 20px;
    cursor: pointer !important;
    transition: all 0.3s ease;
    pointer-events: auto !important;
    position: relative;
    z-index: 99999;
}

.control-button:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.1);
}

.control-button:active {
    transform: scale(0.95);
}

/* Loading indicator */
.loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 12px 24px;
    border-radius: 48px;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(35px);
    -webkit-backdrop-filter: blur(35px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.5),
        inset 0 -1px 0 rgba(255, 255, 255, 0.1),
        inset 0 0 34px 17px rgba(255, 255, 255, 0.07);
    color: white;
    font-size: 16px;
    font-weight: 500;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

/* Loading spinner */
.loading-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes popInButton {
    0% {
        transform: translateX(-50%) scale(0);
        opacity: 0;
    }
    100% {
        transform: translateX(-50%) scale(1);
        opacity: 1;
    }
}

@keyframes popInMarker {
    0% {
        transform: translate(-50%, -50%) scale(0);
        opacity: 0;
    }
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
}

/* Location Card */
.location-card {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    opacity: 0;
    width: 500px;
    height: 320px;
    border-radius: 32px;
    overflow: hidden;
    z-index: 999;
    pointer-events: none;
    cursor: pointer;
    font-family: 'Zalando Sans SemiExpanded', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.location-card.visible {
    pointer-events: all;
}

.card-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

.card-gradient {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7) 0%, transparent 50%);
    z-index: 2;
}

.card-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 24px;
    z-index: 3;
    color: white;
}

.card-title {
    font-size: 28px;
    font-weight: 600;
    margin: 0 0 8px 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.card-address {
    font-size: 16px;
    font-weight: 400;
    margin: 0;
    opacity: 0.9;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.card-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: white;
    font-size: 24px;
    line-height: 1;
    padding-bottom: 2px;
    z-index: 4;
    transition: all 0.3s ease;
}

.card-close:hover {
    background: rgba(0, 0, 0, 0.7);
    transform: scale(1.1);
}

@keyframes popInCard {
    0% {
        transform: translate(-50%, -50%) scale(0);
        opacity: 0;
    }
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
}

/* Mobile adjustments */
@media (max-width: 768px) {
    /* Larger bottom gradient on mobile */
    #globe-container::after {
        height: 80vh !important;
    }

    /* Fix location card sizing on mobile */
    .location-card {
        width: 90vw !important;
        max-width: 90vw !important;
        height: 280px !important;
    }

    .card-title {
        font-size: 20px;
    }

    .card-address {
        font-size: 13px;
    }

    .card-content {
        padding: 16px;
    }
}
