/**
 * Geo Content Switcher Widget Styles
 * 
 * Modern, responsive styling for location-based content switching widget.
 * Compatible with Elementor's styling system and customizable via widget controls.
 */

/* =============================================================================
   Widget Container
   ============================================================================= */

.geo-content-switcher-widget {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    max-width: 1000px;
    margin: 48px auto;
    position: relative;
}

.geo-content-widget {
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.geo-content-widget:hover {
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

/* =============================================================================
   Header Section
   ============================================================================= */

.geo-header {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    color: #ffffff;
    padding: 40px;
    position: relative;
    overflow: hidden;
}

.geo-header::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 120px;
    height: 120px;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="120" height="120" viewBox="0 0 24 24" fill="none" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" opacity="0.05"><path d="M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z"></path></svg>') no-repeat center center;
    pointer-events: none;
}

.geo-widget-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #dc7464;
    font-weight: 700;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom: 16px;
}

.geo-widget-badge svg {
    flex-shrink: 0;
}

.geo-widget-title {
    font-size: clamp(24px, 4vw, 36px);
    font-weight: 700;
    line-height: 1.2;
    margin: 0 0 16px 0;
    color: inherit;
    position: relative;
    z-index: 1;
}

.geo-widget-subtitle {
    font-size: clamp(16px, 2.5vw, 18px);
    line-height: 1.6;
    margin: 0;
    color: #cbd5e1;
    max-width: 600px;
    position: relative;
    z-index: 1;
}

.geo-expert-text {
    color: #ffffff;
    font-weight: 600;
    transition: color 0.3s ease;
}

/* =============================================================================
   Country Tabs
   ============================================================================= */

.geo-tabs {
    display: flex;
    background-color: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    position: relative;
}

.geo-tab-button {
    flex: 1;
    background: transparent;
    border: none;
    padding: 20px;
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 2px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #64748b;
    border-bottom: 2px solid transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    position: relative;
    word-spacing: normal;
}

.geo-tab-button:hover {
    color: #475569;
    background-color: rgba(255, 255, 255, 0.5);
}

.geo-tab-button:focus-visible {
    outline: none;
    box-shadow: inset 0 0 0 2px #dc7464;
}

.geo-tab-button.active {
    background-color: #ffffff;
    color: #dc7464;
    border-bottom-color: #dc7464;
    font-weight: 900;
}

.geo-flag {
    font-size: 16px;
    line-height: 1;
}

/* Tab hover effects */
.geo-tab-button::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: #dc7464;
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.geo-tab-button:hover::after {
    transform: scaleX(0.3);
}

.geo-tab-button.active::after {
    transform: scaleX(1);
}

/* =============================================================================
   Content Area
   ============================================================================= */

.geo-content {
    position: relative;
    background-color: #ffffff;
    padding: 32px 40px;
    min-height: 200px;
}

.geo-content-panel {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
}

.geo-content-panel.active {
    position: relative;
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.geo-content-body {
    padding: 0px 0px 0px 0px !important;
}

.geo-quote {
    font-style: italic;
    font-size: clamp(16px, 2.5vw, 18px);
    line-height: 1.7;
    color: #475569;
    margin: 0 0 32px 0;
    position: relative;
    padding-left: 24px;
}

.geo-quote::before {
    content: '"';
    position: absolute;
    left: 0;
    top: -8px;
    font-size: 48px;
    font-weight: 700;
    color: #dc7464;
    opacity: 0.3;
    line-height: 1;
}

.geo-quote a {
    color: #dc7464;
    text-decoration: none;
    border-bottom: 2px solid rgba(220, 116, 100, 0.2);
    font-weight: 600;
    transition: border-bottom-color 0.3s ease;
}

.geo-quote a:hover {
    border-bottom-color: #dc7464;
}

/* =============================================================================
   CTA Button
   ============================================================================= */

.geo-cta-button {
    display: inline-flex;
    align-items: center;
    gap: 16px;
    background-color: #dc7464;
    color: #ffffff;
    text-decoration: none;
    font-weight: 600 !important;
    font-size: clamp(18px, 2.5vw, 20px);
    padding: 10px 30px !important;
    border-radius: 50px !important;
    transition: all 0.3s ease;
    box-shadow: 0 4px 14px 0 rgba(220, 116, 100, 0.4);
    position: relative;
    overflow: hidden;
}

.geo-cta-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.geo-cta-button:hover {
    background-color: #c5634f;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px 0 rgba(220, 116, 100, 0.5);
    text-decoration: none;
    color: #ffffff;
}

.geo-cta-button:hover::before {
    left: 100%;
}

.geo-cta-button:active {
    transform: translateY(0);
}

.geo-cta-button svg {
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.geo-cta-button:hover svg {
    transform: translateX(4px);
}

/* =============================================================================
   Compliance Footer
   ============================================================================= */

.geo-compliance {
    margin-top: 40px;
    padding-top: 32px;
    border-top: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    gap: 24px;
}

@media (min-width: 768px) {
    .geo-compliance {
        grid-template-columns: repeat(3, 1fr);
    }
}

.geo-compliance-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.geo-compliance-icon {
    flex-shrink: 0;
}

.geo-compliance-icon-group {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.geo-compliance-title {
    display: block;
    font-size: 11px;
    font-weight: 900;
    color: #1e293b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1.2;
}

.geo-compliance-subtitle {
    display: block;
    font-size: 10px;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1.2;
}

/* =============================================================================
   Responsive Design
   ============================================================================= */

/* Tablet */
@media (max-width: 768px) {
    .geo-content-switcher-widget {
        margin: 24px auto;
    }

    .geo-content-widget {
        border-radius: 16px;
        margin: 0 16px;
    }

    .geo-header {
        padding: 32px 24px;
    }

    .geo-widget-title {
        font-size: clamp(20px, 5vw, 28px);
    }

    .geo-widget-subtitle {
        font-size: clamp(14px, 3vw, 16px);
    }

    .geo-tab-button {
        padding: 16px 12px;
        font-size: 10px;
        letter-spacing: 1px;
    }

    .geo-content {
        padding: 32px 24px;
    }
    
    .geo-content-body {
        padding: 0px 0px 32px 0px;
    }

    .geo-quote {
        font-size: clamp(14px, 3vw, 16px);
        padding-left: 20px;
    }

    .geo-cta-button {
        font-size: clamp(16px, 3vw, 18px);
        padding: 10px 28px !important;
        gap: 12px;
        width: 100%;
        justify-content: center;
    }

    .geo-compliance {
        padding-top: 24px;
        margin-top: 24px;
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

/* Mobile */
@media (max-width: 480px) {
    .geo-content-switcher-widget {
        margin: 16px auto;
    }

    .geo-content-widget {
        margin: 0 12px;
        border-radius: 12px;
    }

    .geo-header {
        padding: 24px 20px;
    }

    .geo-header::before {
        width: 80px;
        height: 80px;
    }

    .geo-widget-badge {
        font-size: 9px;
        letter-spacing: 2px;
        margin-bottom: 12px;
    }

    .geo-tab-button {
        padding: 14px 8px;
        font-size: 9px;
        letter-spacing: 0.5px;
        flex-direction: column;
        gap: 4px;
    }

    .geo-flag {
        font-size: 14px;
    }

    .geo-content {
        padding: 24px 20px;
    }
    
    .geo-content-body {
        padding: 0px 0px 24px 0px;
    }

    .geo-quote {
        font-size: 14px;
        margin-bottom: 24px;
        padding-left: 16px;
    }

    .geo-quote::before {
        font-size: 36px;
        top: -6px;
    }

    .geo-cta-button {
        font-size: 16px;
        padding: 8px 24px !important;
        border-radius: 50px !important;
    }

    .geo-compliance {
        padding-top: 20px;
        margin-top: 20px;
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .geo-compliance-item {
        gap: 8px;
    }

    .geo-compliance-title {
        font-size: 10px;
    }

    .geo-compliance-subtitle {
        font-size: 9px;
    }
}

/* =============================================================================
   Accessibility & High Contrast
   ============================================================================= */

/* Focus states */
.geo-tab-button:focus-visible {
    outline: 2px solid #dc7464;
    outline-offset: -2px;
}

.geo-cta-button:focus-visible {
    outline: 2px solid #ffffff;
    outline-offset: 2px;
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .geo-content-widget {
        border-color: #000000;
        border-width: 2px;
    }

    .geo-tab-button.active {
        background-color: #000000;
        color: #ffffff;
    }

    .geo-cta-button {
        border: 2px solid #000000;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .geo-content-widget,
    .geo-tab-button,
    .geo-cta-button,
    .geo-content-panel,
    .geo-expert-text,
    .geo-tab-button::after {
        transition: none;
    }

    .geo-cta-button:hover {
        transform: none;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .geo-content-widget {
        background-color: #1e293b;
        border-color: #374151;
        color: #f1f5f9;
    }

    .geo-header {
        background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    }

    .geo-tabs {
        background-color: #374151;
        border-bottom-color: #4b5563;
    }

    .geo-tab-button {
        color: #94a3b8;
    }

    .geo-tab-button:hover {
        color: #cbd5e1;
        background-color: rgba(255, 255, 255, 0.05);
    }

    .geo-tab-button.active {
        background-color: #1e293b;
        color: #dc7464;
    }

    .geo-content {
        background-color: #1e293b;
        color: #f1f5f9;
    }

    .geo-quote {
        color: #cbd5e1;
    }

    .geo-compliance {
        border-top-color: #4b5563;
    }

    .geo-compliance-title {
        color: #f1f5f9;
    }

    .geo-compliance-subtitle {
        color: #94a3b8;
    }

    .geo-widget-subtitle {
        color: #94a3b8;
    }
}

/* =============================================================================
   Print Styles
   ============================================================================= */

@media print {
    .geo-content-switcher-widget {
        box-shadow: none;
        border: 1px solid #000000;
        margin: 20px 0;
    }

    .geo-header {
        background: #f5f5f5 !important;
        color: #000000 !important;
    }

    .geo-tabs {
        display: none;
    }

    .geo-content-panel {
        display: block !important;
    }

    .geo-cta-button {
        background: #f5f5f5 !important;
        color: #000000 !important;
        border: 1px solid #000000;
    }
}

/* =============================================================================
   RTL Support
   ============================================================================= */

[dir="rtl"] .geo-quote {
    padding-left: 0;
    padding-right: 24px;
}

[dir="rtl"] .geo-quote::before {
    left: auto;
    right: 0;
}

[dir="rtl"] .geo-cta-button svg {
    transform: scaleX(-1);
}

[dir="rtl"] .geo-cta-button:hover svg {
    transform: scaleX(-1) translateX(4px);
}

/* =============================================================================
   Animation Keyframes
   ============================================================================= */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.8;
    }
}

/* Loading state (if needed) */
.geo-content-switcher-widget.loading .geo-expert-text {
    animation: pulse 1.5s ease-in-out infinite;
}

/* =============================================================================
   Elementor Editor Compatibility
   ============================================================================= */

/* Make sure widget is visible in Elementor editor */
.elementor-editor-active .geo-content-switcher-widget {
    pointer-events: auto;
}

/* Ensure proper spacing in Elementor columns */
.elementor-widget-container .geo-content-switcher-widget {
    margin: 0;
}

/* Override Elementor's default link styles */
.elementor-widget-container .geo-cta-button {
    color: #ffffff !important;
    text-decoration: none !important;
}

.elementor-widget-container .geo-cta-button:hover {
    color: #ffffff !important;
    text-decoration: none !important;
}

/* Ensure icons display properly in Elementor */
.elementor-widget-container .geo-widget-badge svg,
.elementor-widget-container .geo-cta-button svg,
.elementor-widget-container .geo-compliance-icon {
    width: auto;
    height: auto;
    max-width: none;
}