/* Simple Language Toggle Button - Digital Artify */
/* Cache busted: v9.0 - Single Button Only */

.da-lang-switcher {
    position: fixed !important;
    top: 20px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    right: auto !important;
    z-index: 9999 !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin: 0 !important;
    padding: 0 !important;
    width: auto !important;
    box-sizing: border-box !important;
}

/* Estilo base del botón - TAMAÑO ESTÁNDAR */
.da-lang-toggle {
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 12px 18px;
    color: #ffffff;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: 0.3px;
    min-width: 90px;
    height: 44px;
    justify-content: center;
    white-space: nowrap;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
    text-transform: uppercase;
}

/* Hover state */
.da-lang-toggle:hover {
    background: rgba(0, 0, 0, 0.85);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

/* Active state */
.da-lang-toggle:active {
    transform: translateY(0) scale(0.98);
}

/* Focus state */
.da-lang-toggle:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(42, 205, 254, 0.3);
}

/* Adaptación para fondos claros */
.da-lang-switcher.on-light-bg .da-lang-toggle {
    background: rgba(255, 255, 255, 0.95);
    color: #333333;
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
}

.da-lang-switcher.on-light-bg .da-lang-toggle:hover {
    background: rgba(255, 255, 255, 1);
    border-color: rgba(0, 0, 0, 0.15);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

/* Desktop - TAMAÑO ESTÁNDAR */
@media (min-width: 769px) {
    .da-lang-switcher {
        top: 20px !important;
    }
    
    .da-lang-toggle {
        height: 44px;
        padding: 12px 18px;
        font-size: 14px;
        min-width: 90px;
        border-radius: 8px;
        font-weight: 500;
    }
}

/* Tablet - TAMAÑO ESTÁNDAR */
@media (max-width: 768px) {
    .da-lang-switcher {
        top: 15px !important;
    }
    
    .da-lang-toggle {
        height: 40px;
        padding: 10px 16px;
        font-size: 13px;
        min-width: 80px;
        border-radius: 8px;
    }
}

/* Mobile - TAMAÑO ESTÁNDAR */
@media (max-width: 480px) {
    .da-lang-switcher {
        top: 12px !important;
    }
    
    .da-lang-toggle {
        height: 36px;
        padding: 8px 14px;
        font-size: 12px;
        min-width: 70px;
        border-radius: 6px;
    }
}

/* Globe icon - TAMAÑO ESTÁNDAR */
.da-lang-globe {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
    opacity: 0.9;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.da-lang-toggle:hover .da-lang-globe {
    transform: rotate(15deg);
}

/* Responsive globe sizing */
@media (max-width: 768px) {
    .da-lang-globe {
        width: 16px;
        height: 16px;
        stroke-width: 1.8;
    }
}

@media (min-width: 769px) {
    .da-lang-globe {
        width: 18px;
        height: 18px;
        stroke-width: 2;
    }
}

/* Mobile touch optimization */
@media (max-width: 768px) {
    .da-lang-switcher {
        -webkit-tap-highlight-color: transparent;
    }
    
    .da-lang-toggle {
        touch-action: manipulation;
        -webkit-touch-callout: none;
        -webkit-user-select: none;
        user-select: none;
    }
}

/* Enhanced text rendering */
.da-lang-toggle {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* High DPI displays optimization */
@media (-webkit-min-device-pixel-ratio: 2) {
    .da-lang-toggle {
        backdrop-filter: blur(35px);
    }
}

/* Language Switch Preloader Prevention */
.language-switch-mode .mil-preloader {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

.language-switch-mode .mil-wrapper,
.language-switch-mode .mil-content {
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
}

/* Fast language switching */
.language-switch-transition {
    transition: opacity 0.1s ease !important;
}

/* Override preloader styles during language switch */
body[data-language-switching="true"] .mil-preloader,
html[data-language-switching="true"] .mil-preloader {
    display: none !important;
}

body[data-language-switching="true"] .mil-wrapper,
html[data-language-switching="true"] .mil-wrapper {
    opacity: 1 !important;
    visibility: visible !important;
}

/* Dark theme compatibility */
@media (prefers-color-scheme: dark) {
    .da-lang-toggle {
        background: rgba(0, 0, 0, 0.2);
        border-color: rgba(255, 255, 255, 0.1);
    }
    
    .da-lang-toggle:hover {
        background: rgba(0, 0, 0, 0.3);
        border-color: rgba(255, 255, 255, 0.2);
    }
}

/* Hide dropdown completely */
.da-lang-dropdown {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}
