/**
 * Rotating Globe Widget Styles
 * assets/css/rotating-globe-widget.css
 */

.rotating-globe-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    position: relative;
}

.text-background-ring {
    stroke: white;
    stroke-width: 13;
    fill: none;
    opacity: 0.9; /* Slightly transparent so it's not too harsh */
}


.elementor-widget-rotating-globe-widget svg text {
    fill: currentColor !important;
}

.elementor-widget-rotating-globe-widget .contact-text {
    color: inherit !important;
}

.globe-link {
    text-decoration: none;
    display: block;
    transition: transform 0.3s ease;
}

.globe-link:hover {
    transform: scale(1.05);
}

.rotating-globe-container {
    width: 400px;
    height: 400px;
    position: relative;
    display: grid;
    place-items: center;
    filter: none;
    transition: filter 0.3s ease;
}

.rotating-globe-container:hover {
    filter: drop-shadow(0 12px 40px rgba(0,0,0,0.3));
}

.contact-badge {
    width: 100%;
    height: 100%;
    position: relative;
    display: grid;
    place-items: center;
}

.globe-center {
    width: 90%;
    height: 90%;
    position: relative;
    z-index: 2;
    border-radius: 50%;
    overflow: hidden;
}

.globe-center canvas {
    width: 100%;
    height: 100%;
    border-radius: 50%;
}

.rotating-text-ring {
    position: absolute;
    inset: 0;
    transform: translateZ(0);
    pointer-events: none;
}

.spin-text {
    animation: spin-clockwise 15s linear infinite;
    transform-origin: 50% 50%;
}

@keyframes spin-clockwise {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.outer-ring, .inner-ring {
    stroke: rgba(255,255,255,0.3);
    stroke-width: 2;
    fill: none;
    transition: stroke 0.3s ease;
}

.contact-text {
    font: 600 14px/1 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    fill: #ffffff;
    /* filter: drop-shadow(2px 2px 4px rgba(0,0,0,0.5)); */
    filter: none; /* ADD THIS */
}

/* Responsive Design */
@media (max-width: 768px) {
    .rotating-globe-container {
        width: 300px;
        height: 300px;
    }
    
    .contact-text {
        font-size: 12px;
        letter-spacing: 0.1em;
    }
}

@media (max-width: 480px) {
    .rotating-globe-container {
        width: 250px;
        height: 250px;
    }
    
    .contact-text {
        font-size: 10px;
    }
}

/* Accessibility: Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
    .spin-text {
        animation: none;
    }
    
    .globe-link:hover {
        transform: none;
    }
    
    .rotating-globe-container:hover {
        filter: drop-shadow(0 8px 32px rgba(0,0,0,0.2));
    }
}

/* Container sizing based on Elementor controls */
.rotating-globe-wrapper .rotating-globe-container {
    max-width: 100%;
    max-height: 100%;
    aspect-ratio: 1 / 1;
}

/* Ensure the widget adapts to any container size */
.elementor-widget-rotating-globe-widget {
    display: flex;
    align-items: center;
    justify-content: center;
}

.elementor-widget-rotating-globe-widget .rotating-globe-wrapper {
    width: 100%;
    height: 100%;
    min-height: 200px;
}

/* Loading state */
.rotating-globe-container.loading {
    opacity: 0.7;
}

.rotating-globe-container.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 30px;
    height: 30px;
    margin: -15px 0 0 -15px;
    border: 3px solid rgba(255,255,255,0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: loading-spin 1s linear infinite;
    z-index: 10;
}

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

/* Hover effects for interactive elements */
.globe-link:hover .outer-ring,
.globe-link:hover .inner-ring {
    stroke: rgba(255,255,255,0.6);
}

.globe-link:hover .contact-text {
    filter: drop-shadow(2px 2px 8px rgba(255,255,255,0.3));
}

/* Focus states for accessibility */
.globe-link:focus {
    outline: 2px solid rgba(255,255,255,0.8);
    outline-offset: 4px;
    border-radius: 50%;
}

.globe-link:focus .rotating-globe-container {
    filter: drop-shadow(0 0 0 3px rgba(255,255,255,0.5));
}