/* ============================================
   GLOBE COMPONENT STYLES
   3D visualization container
   ============================================ */

#globe-container {
    position: absolute;
    top: 45px;
    left: 0;
    width: 100%;
    height: calc(100% - 45px);
    z-index: 1;
    cursor: grab;
}

/* Change cursor when dragging */
#globe-container:active {
    cursor: grabbing;
}

/* Ensure canvas fills container */
#globe-container canvas {
    display: block;
    width: 100% !important;
    height: 100% !important;
}

/* Country name display */
#country-name-display {
    position: fixed;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    color: #ffffff;
    font-family: var(--font-retro);
    font-size: 16px;
    letter-spacing: 1px;
    text-transform: uppercase;
    pointer-events: none;
    z-index: 9998;
}

/* Mobile cursor (airplane image) - dynamically positioned at center of globe container */
#mobile-cursor {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 9999;
}

#mobile-cursor img {
    width: 25px;
    height: 25px;
    object-fit: contain;
    /* Reduced transition for faster response during drag direction changes */
    transition: transform 0.05s ease-out;
}

/* Mobile-only styles */
@media (max-width: 768px) {
    /* Show mobile cursor on touch devices */
    #mobile-cursor {
        display: block;
    }

    /* Make country name clickable on mobile - restructured layout */
    #country-name-display {
        pointer-events: auto;
        cursor: pointer;
        padding: 14px 20px;
        background-color: rgba(237, 0, 0, 1);
        border-radius: 20px;
        transition: background-color 0.2s ease;
        min-width: 320px;
        max-width: 95vw;
    }

    #country-name-display:active {
        background-color: rgba(200, 0, 0, 0.9);
    }

    /* Badge content container - flexbox for horizontal layout */
    .badge-content {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
    }

    /* Badge info section (location + date stacked) */
    .badge-info {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
        flex: 1;
    }

    /* Location name styling */
    .badge-location {
        font-family: var(--font-retro);
        font-size: 14px;
        letter-spacing: 1px;
        text-transform: uppercase;
        color: #ffffff;
    }

    /* Date styling */
    .badge-date {
        font-family: var(--font-retro);
        font-size: 10px;
        letter-spacing: 0.5px;
        color: rgba(255, 255, 255, 0.8);
    }

    /* Chevron indicator */
    .badge-chevron {
        font-size: 20px;
        color: #ffffff;
        font-weight: bold;
        line-height: 1;
        flex-shrink: 0;
    }
}

/* Mobile Landscape View */
@media screen and (max-height: 450px) and (orientation: landscape) {
    #mobile-cursor {
        display: block;
    }

    #country-name-display {
        pointer-events: auto;
        cursor: pointer;
        padding: 10px 16px;
        background-color: rgba(237, 0, 0, 1);
        border-radius: 16px;
        min-width: 280px;
        max-width: 90vw;
        bottom: 10px;
    }

    .badge-content {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
    }

    .badge-info {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 2px;
    }

    .badge-location {
        font-family: var(--font-retro);
        font-size: 12px;
        letter-spacing: 1px;
        text-transform: uppercase;
        color: #ffffff;
    }

    .badge-date {
        font-family: var(--font-retro);
        font-size: 9px;
        color: rgba(255, 255, 255, 0.8);
    }

    .badge-chevron {
        font-size: 18px;
        color: #ffffff;
        font-weight: bold;
    }
}

/* Map Pin Styles */
.map-pin-container {
    cursor: pointer;
    position: relative;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    pointer-events: auto;
}

.map-pin {
    display: flex;
    flex-direction: column;
    align-items: center;
    will-change: transform;
    backface-visibility: hidden;
    transform: translateZ(0);
    position: relative;
}

.map-pin-container.hovered .map-pin {
    transform: scale(1.2);
    transition: transform 0.15s ease;
}

/* SD Card pin image */
.map-pin-image {
    width: 18px;
    height: auto;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.4));
    pointer-events: auto;
    will-change: transform;
    backface-visibility: hidden;
}

/* Tooltip (hidden by default) */
.map-pin-tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: 8px;
    background-color: rgba(0, 0, 0, 0.85);
    color: #ffffff;
    font-family: var(--font-retro);
    font-size: 11px;
    letter-spacing: 0.5px;
    padding: 6px 10px;
    border-radius: 4px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.15s ease, visibility 0.15s ease;
    pointer-events: none;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
}

.tooltip-location {
    color: #ffffff;
    white-space: nowrap;
}

.tooltip-date {
    color: rgba(255, 255, 255, 0.45);
    font-size: 8px;
    white-space: nowrap;
}

.map-pin-container.hovered .map-pin-tooltip {
    opacity: 1;
    visibility: visible;
}

/* NEW! indicator on pins */
.map-pin-new {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-top: 4px;
    background-color: #ED0000;
    color: #ffffff;
    font-family: var(--font-retro);
    font-size: 8px;
    font-weight: bold;
    letter-spacing: 0.5px;
    padding: 2px 4px;
    border-radius: 2px;
    white-space: nowrap;
    pointer-events: none;
    animation: pulse-new 2s ease-in-out infinite;
}

@keyframes pulse-new {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}
