/* ============================================================
   IQS Globe Locations – Styles
   All classes prefixed with .iqs-globe- to avoid theme conflicts
   ============================================================ */

.iqs-globe-wrapper {
    position: relative;
    width: 100%;
    height: 80vh;
    min-height: 500px;
    background: #f5f5f3;
    overflow: hidden;
    font-family: 'Raleway', sans-serif;
    /* Reset any Divi transforms that break child positioning */
    transform: none !important;
}

/* ── Loading ─────────────────────────────────────────────── */
.iqs-globe-loading {
    position: absolute;
    inset: 0;
    background: #f5f5f3;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 100;
    transition: opacity 0.6s ease;
}

.iqs-globe-loading.iqs-hide {
    opacity: 0;
    pointer-events: none;
}

.iqs-globe-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid #e0e0dc;
    border-top-color: #1b2040;
    border-radius: 50%;
    animation: iqsGlobeSpin 0.8s linear infinite;
    margin-bottom: 16px;
}

.iqs-globe-loading p {
    font-family: 'Raleway', sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: #1b2040;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin: 0;
    padding: 0;
}

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

/* ── Globe Canvas ────────────────────────────────────────── */
.iqs-globe-container {
    position: absolute;
    inset: 0;
    cursor: grab;
    /* pan-y: browser handles vertical scroll; JS handles horizontal drag + pinch */
    touch-action: pan-y;
}

.iqs-globe-container:active {
    cursor: grabbing;
}

.iqs-globe-container canvas {
    display: block;
    width: 100% !important;
    height: 100% !important;
    touch-action: pan-y;
}

/* ── Tooltip ─────────────────────────────────────────────── */
.iqs-globe-tooltip {
    position: fixed;
    pointer-events: none;
    background: #1b2040;
    color: #ffffff;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-family: 'Raleway', sans-serif;
    font-weight: 600;
    letter-spacing: 0.02em;
    opacity: 0;
    transition: opacity 0.18s ease;
    z-index: 10000;
    white-space: nowrap;
    box-shadow: 0 4px 20px rgba(27, 32, 64, 0.25);
}

.iqs-globe-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: #1b2040;
}

.iqs-globe-tooltip.iqs-visible {
    opacity: 1;
}

/* ── Header ──────────────────────────────────────────────── */
.iqs-globe-header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    padding: 24px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 10;
    pointer-events: none;
}

.iqs-globe-header-left h2 {
    font-family: 'Raleway', sans-serif !important;
    font-size: 15px !important;
    font-weight: 800 !important;
    color: #1b2040 !important;
    letter-spacing: 0.14em !important;
    text-transform: uppercase !important;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1.3 !important;
}

.iqs-globe-header-left p {
    font-size: 12px;
    font-weight: 500;
    color: #8b8fa0;
    margin: 3px 0 0 0;
    padding: 0;
    letter-spacing: 0.04em;
    line-height: 1.4;
}

.iqs-globe-stats {
    display: flex;
    gap: 32px;
}

.iqs-globe-stat {
    text-align: right;
}

.iqs-globe-stat-value {
    font-family: 'Raleway', sans-serif;
    font-size: 24px;
    font-weight: 800;
    color: #1b2040;
    line-height: 1.2;
}

.iqs-globe-stat-label {
    font-size: 11px;
    font-weight: 600;
    color: #8b8fa0;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-top: 2px;
}

/* ── Footer / Legend ─────────────────────────────────────── */
.iqs-globe-footer {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 18px 32px;
    display: flex;
    justify-content: center;
    gap: 28px;
    z-index: 10;
    pointer-events: none;
}

.iqs-globe-legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 600;
    color: #8b8fa0;
    letter-spacing: 0.03em;
}

.iqs-globe-legend-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.iqs-globe-dot-ca { background: #2d5faa; }
.iqs-globe-dot-us { background: #1b2040; }
.iqs-globe-dot-mx { background: #9b5b2e; }
.iqs-globe-dot-za { background: #3a7d6e; }

/* ── Drag Hint ───────────────────────────────────────────── */
.iqs-globe-drag-hint {
    position: absolute;
    bottom: 50px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 11px;
    font-weight: 600;
    color: #b8bac8;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    z-index: 10;
    pointer-events: none;
    animation: iqsGlobeFadeHint 4s ease 3s forwards;
}

@keyframes iqsGlobeFadeHint {
    to { opacity: 0; }
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 768px) {
    .iqs-globe-wrapper {
        min-height: 400px;
        height: 70vh;
    }

    .iqs-globe-header {
        padding: 16px 20px;
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .iqs-globe-stats {
        gap: 20px;
    }

    .iqs-globe-stat-value {
        font-size: 18px;
    }

    .iqs-globe-stat-label {
        font-size: 10px;
    }

    .iqs-globe-header-left h2 {
        font-size: 12px !important;
        letter-spacing: 0.10em !important;
    }

    .iqs-globe-header-left p {
        font-size: 11px;
    }

    .iqs-globe-footer {
        padding: 12px 16px;
        gap: 14px;
    }

    .iqs-globe-legend-item {
        font-size: 10px;
    }

    .iqs-globe-legend-dot {
        width: 6px;
        height: 6px;
    }

    .iqs-globe-tooltip {
        font-size: 12px;
        padding: 6px 12px;
    }

    .iqs-globe-drag-hint {
        bottom: 42px;
        font-size: 10px;
    }
}
