/**
 * JetWeb Translate - Frontend Styles
 * Language Switcher Styles
 */

/* Language Switcher Container */
.jetweb-translate-language-switcher {
    position: fixed;
    z-index: 999999;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    font-size: 14px;
    line-height: 1.4;
}

/* Position Classes */
.jetweb-translate-position-bottom-right {
    bottom: 20px;
    right: 20px;
}

.jetweb-translate-position-bottom-left {
    bottom: 20px;
    left: 20px;
}

.jetweb-translate-position-top-right {
    top: 20px;
    right: 20px;
}

.jetweb-translate-position-top-left {
    top: 20px;
    left: 20px;
}

.jetweb-translate-position-inline {
    position: relative;
    display: inline-block;
}

/* Dropdown Style */
.jetweb-translate-style-dropdown .jetweb-translate-lang-current {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: #ffffff;
    border: 1px solid #dcdcde;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #1d2327;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
}

.jetweb-translate-style-dropdown .jetweb-translate-lang-current:hover {
    border-color: #2271b1;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.jetweb-translate-style-dropdown .jetweb-translate-lang-arrow {
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid #646970;
    transition: transform 0.2s ease;
}

.jetweb-translate-style-dropdown .jetweb-translate-lang-current[aria-expanded="true"] .jetweb-translate-lang-arrow {
    transform: rotate(180deg);
}

.jetweb-translate-style-dropdown .jetweb-translate-lang-list {
    position: absolute;
    bottom: 100%;
    right: 0;
    margin: 0 0 8px 0;
    padding: 8px 0;
    background: #ffffff;
    border: 1px solid #dcdcde;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    list-style: none;
    min-width: 180px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.2s ease;
}

.jetweb-translate-position-top-right .jetweb-translate-lang-list,
.jetweb-translate-position-top-left .jetweb-translate-lang-list {
    bottom: auto;
    top: 100%;
    margin: 8px 0 0 0;
}

.jetweb-translate-position-bottom-left .jetweb-translate-lang-list,
.jetweb-translate-position-top-left .jetweb-translate-lang-list {
    right: auto;
    left: 0;
}

.jetweb-translate-style-dropdown .jetweb-translate-lang-current[aria-expanded="true"] + .jetweb-translate-lang-list {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.jetweb-translate-style-dropdown .jetweb-translate-lang-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    color: #1d2327;
    text-decoration: none;
    transition: background-color 0.15s ease;
}

.jetweb-translate-style-dropdown .jetweb-translate-lang-item:hover {
    background-color: #f0f6fc;
}

.jetweb-translate-style-dropdown .jetweb-translate-lang-item.active {
    background-color: #2271b1;
    color: #ffffff;
}

/* Flags Style */
.jetweb-translate-style-flags .jetweb-translate-lang-flags {
    display: flex;
    gap: 8px;
    padding: 8px 12px;
    background: #ffffff;
    border: 1px solid #dcdcde;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.jetweb-translate-style-flags .jetweb-translate-lang-flag-item {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    font-size: 20px;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.2s ease;
    opacity: 0.7;
}

.jetweb-translate-style-flags .jetweb-translate-lang-flag-item:hover {
    opacity: 1;
    transform: scale(1.1);
}

.jetweb-translate-style-flags .jetweb-translate-lang-flag-item.active {
    opacity: 1;
    background-color: #f0f6fc;
    box-shadow: 0 0 0 2px #2271b1;
}

/* List Style */
.jetweb-translate-style-list .jetweb-translate-lang-list-inline {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: #ffffff;
    border: 1px solid #dcdcde;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.jetweb-translate-style-list .jetweb-translate-lang-item {
    color: #646970;
    text-decoration: none;
    font-size: 13px;
    transition: color 0.15s ease;
}

.jetweb-translate-style-list .jetweb-translate-lang-item:hover {
    color: #2271b1;
}

.jetweb-translate-style-list .jetweb-translate-lang-item.active {
    color: #1d2327;
    font-weight: 600;
}

.jetweb-translate-style-list .jetweb-translate-lang-separator {
    color: #dcdcde;
}

/* Flag Emoji */
.jetweb-translate-lang-flag {
    font-size: 18px;
    line-height: 1;
}

/* RTL Support */
.jetweb-translate-rtl {
    direction: rtl;
}

/* Mobile Responsiveness */
@media (max-width: 600px) {
    .jetweb-translate-language-switcher:not(.jetweb-translate-position-inline) {
        bottom: 10px !important;
        right: 10px !important;
        left: auto !important;
        top: auto !important;
    }

    .jetweb-translate-style-dropdown .jetweb-translate-lang-current {
        padding: 8px 12px;
        font-size: 13px;
    }

    .jetweb-translate-style-dropdown .jetweb-translate-lang-list {
        min-width: 160px;
    }

    .jetweb-translate-style-flags .jetweb-translate-lang-flag-item {
        width: 28px;
        height: 28px;
        font-size: 18px;
    }
}

/* Print Styles */
@media print {
    .jetweb-translate-language-switcher {
        display: none !important;
    }
}
