/* Styling for Super Globe 3D - Modern & Sleek */

#sg3d-globe-container-wrapper {
    margin: 30px auto;
    border: none;
    padding: 0;
    background-color: transparent;
    border-radius: 8px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.08);
    overflow: hidden;
    max-width: 1200px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    font-size: 14px;
    pointer-events: none;
}

.sg3d-filters {
    margin: 0;
    padding: 15px 20px;
    background-color: #f8f9fa;
    display: flex;
    align-items: center;
    border-bottom: 1px solid #eaecef;
    pointer-events: auto;
}

.sg3d-filters label {
    margin-right: 10px;
    font-size: 14px;
    font-weight: 500;
    color: #444;
}

#sg3d_mission_filter_dropdown {
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    background-color: white;
    font-size: 14px;
    color: #555;
    min-width: 150px;
    cursor: pointer;
    transition: border-color 0.3s, box-shadow 0.3s;
}

#sg3d_mission_filter_dropdown:focus {
    outline: none;
    border-color: #4f86ed;
    box-shadow: 0 0 0 3px rgba(79, 134, 237, 0.2);
}

#sg3d-globe-container {
    width: 100%;
    height: 500px;
    position: relative;
    overflow: hidden;
    background: radial-gradient(ellipse at center, #182330 0%, #0c1218 100%);
    pointer-events: none;
    /* Allow browser vertical scrolling outside globe while still receiving events inside */
    touch-action: auto;
}

#sg3d-globe-container canvas {
    cursor: grab;
    pointer-events: auto;
    touch-action: none;
    position: relative;
    z-index: 1;
}

#sg3d-globe-container canvas:active {
    cursor: grabbing;
}

/* Location marker hover cursor */
.sg3d-location-marker {
    cursor: pointer !important;
}

/* Info Card */
.sg3d-info-card {
    position: absolute;
    /* top/left set dynamically via JS */
    background-color: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    padding: 0;
    width: 320px;
    max-height: 70vh;
    overflow-y: auto;
    z-index: 2;
    font-size: 14px;
    display: none;
    transition: all 0.3s ease;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    pointer-events: auto;
}

.sg3d-info-card::-webkit-scrollbar {
    width: 6px;
}

.sg3d-info-card::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 6px;
}

.sg3d-info-card::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 6px;
}

.sg3d-info-card::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.3);
}

.sg3d-featured-image-container {
    position: relative;
    width: 100%;
    height: 140px;
    overflow: hidden;
    border-radius: 12px 12px 0 0;
}

.sg3d-featured-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.sg3d-featured-image-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.4) 60%, rgba(0,0,0,0) 100%);
    color: white;
    padding: 8px 15px;
}

.sg3d-featured-image-overlay h3 {
    margin: 2px 0;
    padding: 0;
    color: white;
    font-size: 18px;
    line-height: 1.2;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
    border-bottom: none;
}

.sg3d-info-content {
    padding: 10px 15px 10px 8px;
    font-size: 14px;
}

.sg3d-info-content table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 0;
}

.sg3d-info-content table tr {
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.sg3d-info-content table tr:last-child {
    border-bottom: none;
}

.sg3d-info-content table th,
.sg3d-info-content table td {
    padding: 6px 0;
    vertical-align: top;
    line-height: 1.3;
}

.sg3d-info-content table th {
    font-weight: 600;
    width: 38%;
    color: #444;
    text-align: left;
    padding: 8px 8px 0px !important; /* 0 top/bottom, 8px left/right */
}

.sg3d-info-content table td {
    color: #555;
    padding: 2px 8px 8px !important /* tighter spacing: less before value */
}

.sg3d-info-content table td a {
    color: #0073aa;
    text-decoration: none;
    transition: color 0.2s;
}

.sg3d-info-content table td a:hover {
    color: #00a0d2;
    text-decoration: underline;
}

.sg3d-close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.3);
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: white;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s, color 0.2s;
    z-index: 2;
    padding: 0;
    line-height: 1;
}

.sg3d-close-btn:hover {
    color: white;
    background-color: rgba(0, 0, 0, 0.5);
}

/* Location Marker Styles */
.sg3d-location-marker {
    cursor: pointer;
    transition: transform 0.2s, opacity 0.2s;
}

.sg3d-location-marker:hover {
    transform: scale(1.2);
}

/* Hover effect for location markers */
.sg3d-location-marker-hover {
    color: #ffcc00 !important;
    transform: scale(1.2);
}

/* Instructions text */
.sg3d-instructions {
    text-align: center;
    font-size: 12px;
    color: #777;
    margin: 8px 0 0;
    padding: 0;
    letter-spacing: 0.3px;
}

/* Premium badge */
.sg3d-premium-badge {
    font-size: 12px;
    text-align: center;
    margin: 0;
    padding: 6px 0;
    color: #3a7b3f;
    font-weight: 600;
    background-color: #f0f7f0;
    border-radius: 4px;
}

.sg3d-premium-icon {
    color: #ffcc00;
    font-size: 14px;
    margin-right: 4px;
    vertical-align: -1px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .sg3d-info-card {
        max-width: 90%;
        width: 90%;
        top: 10px;
        left: 5%;
        right: 5%;
        max-height: 80vh;
    }
    
    .sg3d-featured-image-container {
        height: 160px;
    }
    
    .sg3d-featured-image-overlay h3 {
        font-size: 16px;
    }
    
    #sg3d-globe-container {
        height: 450px !important;
    }
    
    .sg3d-filters {
        padding: 10px 15px;
        flex-direction: column;
        align-items: flex-start;
    }
    
    .sg3d-filters label {
        margin-bottom: 5px;
    }
    
    #sg3d_mission_filter_dropdown {
        width: 100%;
    }
}

/* Arrow pointer connecting marker to info card */
.sg3d-info-card.arrow-left::before,
.sg3d-info-card.arrow-right::before {
    content: "";
    position: absolute;
    top: calc(50% - 8px);
    width: 0;
    height: 0;
    border-style: solid;
}

.sg3d-info-card.arrow-left::before {
    left: -10px;
    border-width: 8px 10px 8px 0;
    border-color: transparent rgba(255, 255, 255, 0.95) transparent transparent;
}

.sg3d-info-card.arrow-right::before {
    right: -10px;
    border-width: 8px 0 8px 10px;
    border-color: transparent transparent transparent rgba(255, 255, 255, 0.95);
}

/* Connector line between marker and card */
.sg3d-connector-line {
    display: none;
}

/* Info card entrance animation */
.sg3d-info-card.animate-in {
    animation: sg3dCardIn 0.35s ease-out forwards;
}

@keyframes sg3dCardIn {
    0% { opacity: 0; transform: translateY(10px) scale(0.95); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

body #sg3d-globe-container .sg3d-info-card table tr:not(.sg3d-label-row) {
    border-bottom: 1px solid rgba(0,0,0,0.08) !important;
}

.sg3d-info-content table tr.sg3d-label-row {
    border-bottom: none !important;
}

body #sg3d-globe-container .sg3d-info-card table tr:not(.sg3d-label-row):last-child {
    border-bottom: none !important;
}

/* Tooltip styling */
.sg3d-tooltip {
    position: absolute;
    pointer-events: none;
    background: rgba(0, 0, 0, 0.75);
    color: #fff;
    font-size: 12px;
    padding: 3px 6px;
    border-radius: 3px;
    white-space: nowrap;
    display: none;
    z-index: 999;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

/* Scroll hint overlay for mobile */
.sg3d-scroll-hint {
    position: absolute;
    bottom: 14px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.65);
    color: #fff;
    padding: 6px 12px;
    font-size: 13px;
    border-radius: 20px;
    z-index: 9999;
    pointer-events: none; /* do not block touch */
    opacity: 0;
    transition: opacity 0.3s ease;
}
.sg3d-scroll-hint.visible {
    opacity: 1;
} 