/**
 * Alfabet Google Translate - Styles
 * @author Alfabet Marki
 */

/* Ukrycie domyślnego widgetu Google Translate */
#google_translate_element {
    position: absolute !important;
    top: -9999px !important;
    left: -9999px !important;
    opacity: 0 !important;
    pointer-events: none !important;
    height: 0 !important;
    overflow: hidden !important;
}

.goog-te-banner-frame,
.goog-te-balloon-frame,
.goog-tooltip,
.goog-tooltip:hover,
body > .skiptranslate,
.goog-te-gadget,
#goog-gt-tt,
.goog-te-spinner-pos,
.goog-te-spinner-animation,
.goog-te-menu-frame {
    display: none !important;
}

body {
    top: 0 !important;
    position: static !important;
}

.goog-text-highlight {
    background: none !important;
    box-shadow: none !important;
}

/* ============================================
   SWITCHER - Proste przyciski inline
   ============================================ */

.alfabetgt-switcher {
    display: inline-flex;
    align-items: center;
    gap: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    z-index: 999999;
}

/* Fixed Positions */
.alfabetgt-switcher.alfabetgt-fixed {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.95);
    padding: 8px 12px;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(10px);
}

.alfabetgt-switcher.alfabetgt-fixed-left {
    position: fixed;
    bottom: 20px;
    left: 20px;
    background: rgba(255, 255, 255, 0.95);
    padding: 8px 12px;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(10px);
}

.alfabetgt-switcher.alfabetgt-fixed-top-right {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.95);
    padding: 8px 12px;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(10px);
}

.alfabetgt-switcher.alfabetgt-fixed-top-left {
    position: fixed;
    top: 20px;
    left: 20px;
    background: rgba(255, 255, 255, 0.95);
    padding: 8px 12px;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(10px);
}

/* Inline Position */
.alfabetgt-switcher.alfabetgt-inline {
    display: inline-flex;
}

/* Separator | */
.alfabetgt-separator {
    color: #444;
    font-size: 14px;
    margin: 0 4px;
    user-select: none;
}

/* Button */
.alfabetgt-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0px 0px;
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #666;
    transition: all 0.2s ease;
    border-radius: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid transparent;
    transition: 300ms all ease;
}

.alfabetgt-btn:hover {
    color: #faa619;
   border-bottom: 1px solid #faa619;
}
.alfabetgt-btn.active {
    color: #000;
    border-bottom: 1px solid #000;
}

/* Flag */
.alfabetgt-flag {
    width: 30px;
    margin-right: 5px;
    object-fit: cover;
    border-radius: 2px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Code */
.alfabetgt-code {
    font-size: 13px;
}

/* Loading state */
.alfabetgt-btn.loading {
    opacity: 0.6;
    pointer-events: none;
}

.alfabetgt-btn.loading::after {
    content: '';
    width: 12px;
    height: 12px;
    border: 2px solid #ccc;
    border-top-color: #333;
    border-radius: 50%;
    animation: alfabetgt-spin 0.6s linear infinite;
    margin-left: 0px;
    position: absolute;
}

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

/* Responsive */
@media (max-width: 768px) {
    .alfabetgt-switcher.alfabetgt-fixed,
    .alfabetgt-switcher.alfabetgt-fixed-left,
    .alfabetgt-switcher.alfabetgt-fixed-top-right,
    .alfabetgt-switcher.alfabetgt-fixed-top-left {
        padding: 6px 10px;
    }

    .alfabetgt-btn {
        padding: 4px 8px;
        font-size: 12px;
    }

    .alfabetgt-flag {
        width: 18px;
        height: 12px;
    }
}

/* Animation */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

.alfabetgt-switcher {
    animation: fadeIn 0.3s ease;
}

/* Fix dla przetłumaczonych elementów */
font[style*="vertical-align: inherit"] {
    vertical-align: baseline !important;
}

.translated-ltr,
.translated-rtl {
    font-family: inherit !important;
}

/* Elementy z klasą notranslate nie będą tłumaczone przez Google */
.notranslate {
    /* Zapobiegaj tłumaczeniu */
}

/* Ukryj miganie tekstu w elementach dynamicznych podczas tłumaczenia */
.info-o-dostawie,
.product-additional-info-text {
    transition: opacity 0.15s ease;
}

.alfabetgt-translating .info-o-dostawie,
.alfabetgt-translating .product-additional-info-text {
    opacity: 0.5;
}
