/* ============================================
   3D GLOBE STYLES - Clean Pin Design
   Version: 2.0.0
   ============================================ */

/* ============================================
   GLOBE CONTAINER
   ============================================ */
/* Globe wrapper - controls position */
.globe-wrapper {
    display: flex;
    width: 100%;
}

.globe-position-center {
    justify-content: center;
}

.globe-position-center .globe-container {
    width: 100%;
}

.globe-position-left {
    justify-content: flex-start;
}

.globe-position-left .globe-container {
    width: 75%;
}

.globe-position-right {
    justify-content: flex-end;
}

.globe-position-right .globe-container {
    width: 75%;
}

.globe-container,
[data-globe] {
    position: relative;
    height: 100%;
    min-height: 400px;
    overflow: hidden;
    background: transparent;
}

.globe-container canvas,
[data-globe] canvas {
    display: block;
    cursor: grab;
}

.globe-container canvas:active,
[data-globe] canvas:active {
    cursor: grabbing;
}

/* ============================================
   MARKER LABELS - Clean Modern Style
   ============================================ */
.globe-marker-label {
    position: absolute;
    pointer-events: none;
    z-index: 100;
    opacity: 0;
    transform: translate(-50%, -100%) scale(0.9);
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.globe-label-content {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 10px;
    padding: 10px 14px;
    box-shadow:
        0 4px 24px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.05) inset;
    white-space: nowrap;
}

.globe-label-content img {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid rgba(59, 130, 246, 0.5);
    object-fit: cover;
}

.globe-label-content span {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 13px;
    font-weight: 500;
    color: #ffffff;
    letter-spacing: 0.01em;
}

/* Arrow pointer */
.globe-label-content::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid rgba(15, 23, 42, 0.95);
}

/* ============================================
   CONTROLS OVERLAY
   ============================================ */
.globe-controls {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 50;
}

.globe-control-btn {
    padding: 10px 20px;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 8px;
    color: #ffffff;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.globe-control-btn:hover {
    background: rgba(59, 130, 246, 0.2);
    border-color: rgba(59, 130, 246, 0.6);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}

.globe-control-btn:active {
    transform: translateY(0);
}

.globe-control-btn.active {
    background: rgba(59, 130, 246, 0.3);
    border-color: #3b82f6;
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.3);
}

/* Icon buttons */
.globe-control-btn-icon {
    width: 42px;
    height: 42px;
    padding: 0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

/* ============================================
   MARKER LIST SIDEBAR
   ============================================ */
.globe-marker-list {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 260px;
    max-height: calc(100% - 40px);
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 12px;
    overflow: hidden;
    z-index: 50;
}

.globe-marker-list-header {
    padding: 14px 16px;
    border-bottom: 1px solid rgba(59, 130, 246, 0.15);
    background: rgba(59, 130, 246, 0.05);
}

.globe-marker-list-header h4 {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 11px;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin: 0;
}

.globe-marker-list-content {
    overflow-y: auto;
    max-height: calc(100% - 50px);
    padding: 8px;
}

.globe-marker-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.globe-marker-item:hover {
    background: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.2);
}

.globe-marker-item.active {
    background: rgba(59, 130, 246, 0.15);
    border-color: rgba(59, 130, 246, 0.4);
}

.globe-marker-item img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid rgba(59, 130, 246, 0.3);
    object-fit: cover;
}

.globe-marker-item-info {
    flex: 1;
    min-width: 0;
}

.globe-marker-item-label {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 13px;
    font-weight: 500;
    color: #ffffff;
    margin: 0 0 2px 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.globe-marker-item-coords {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 11px;
    color: #64748b;
    margin: 0;
}

/* ============================================
   INFO PANEL
   ============================================ */
.globe-info-panel {
    position: absolute;
    top: 20px;
    left: 20px;
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 12px;
    padding: 16px 20px;
    max-width: 280px;
    z-index: 50;
}

.globe-info-panel h3 {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
    margin: 0 0 8px 0;
}

.globe-info-panel p {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 13px;
    color: #94a3b8;
    margin: 0;
    line-height: 1.5;
}

/* ============================================
   LOADING STATE
   ============================================ */
.globe-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    color: #ffffff;
}

.globe-loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(59, 130, 246, 0.2);
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: globe-spin 0.8s linear infinite;
}

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

.globe-loading-text {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 13px;
    color: #94a3b8;
}

/* ============================================
   THEME VARIATIONS
   ============================================ */

/* Dark theme (default) */
.globe-container.theme-dark {
    background: radial-gradient(ellipse at center, #1e293b 0%, #0f172a 70%, #020617 100%);
}

/* Space theme */
.globe-container.theme-space {
    background: radial-gradient(ellipse at center, #0f172a 0%, #020617 100%);
}

/* Minimal theme */
.globe-container.theme-minimal {
    background: transparent;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 768px) {
    .globe-container,
    [data-globe] {
        min-height: 350px;
    }

    .globe-label-content {
        padding: 8px 12px;
        gap: 8px;
    }

    .globe-label-content img {
        width: 24px;
        height: 24px;
    }

    .globe-label-content span {
        font-size: 12px;
    }

    .globe-marker-list {
        position: fixed;
        top: auto;
        right: 0;
        bottom: 0;
        left: 0;
        width: 100%;
        max-height: 200px;
        border-radius: 16px 16px 0 0;
    }

    .globe-info-panel {
        top: 10px;
        left: 10px;
        right: 10px;
        max-width: none;
    }

    .globe-controls {
        bottom: 16px;
    }

    .globe-control-btn {
        padding: 8px 16px;
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .globe-container,
    [data-globe] {
        min-height: 300px;
    }

    .globe-control-btn {
        padding: 8px 12px;
        font-size: 11px;
    }

    .globe-control-btn-icon {
        width: 36px;
        height: 36px;
    }
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes globe-pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.6;
    }
    50% {
        transform: scale(2);
        opacity: 0;
    }
}

@keyframes globe-fade-in {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.globe-animate-in {
    animation: globe-fade-in 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================
   ACCESSIBILITY
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    .globe-loading-spinner {
        animation: none;
    }

    .globe-marker-label,
    .globe-control-btn,
    .globe-marker-item {
        transition: none;
    }
}

/* High contrast */
@media (prefers-contrast: high) {
    .globe-label-content,
    .globe-marker-list,
    .globe-control-btn,
    .globe-info-panel {
        border-width: 2px;
    }
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
    .globe-container,
    [data-globe] {
        display: none;
    }
}
