/* ==============================================
   AUTO TRANSLATE – FRONTEND STYLES
   Language Switcher (Dropdown + Buttons + Flags)
   ============================================== */

/* Wrapper */
.atp-switcher-wrap {
    display: flex;
    align-items: center;
    position: relative;
}

/* ==== DROPDOWN MODE ==== */

.atp-dropdown {
    position: relative;
    display: inline-block;
}

.atp-dropdown-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: #ffffff;
    border: 1px solid #ddd;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-family: inherit;
    color: #333;
    transition: all 0.25s ease;
    white-space: nowrap;
    line-height: 1.4;
}

.atp-dropdown-toggle:hover {
    border-color: #999;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.atp-dropdown-toggle:focus {
    outline: 2px solid #2271b1;
    outline-offset: 1px;
}

.atp-arrow {
    font-size: 12px;
    transition: transform 0.25s ease;
    opacity: 0.6;
}

.atp-dropdown.open .atp-arrow {
    transform: rotate(180deg);
}

/* Dropdown Menu */
.atp-dropdown-menu {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    min-width: 100%;
    background: #ffffff;
    border: 1px solid #ddd;
    border-radius: 6px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    z-index: 99999;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.25s ease;
    overflow: hidden;
}

.atp-dropdown.open .atp-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.atp-dropdown-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    text-decoration: none;
    color: #333;
    font-size: 14px;
    transition: background 0.15s ease;
    white-space: nowrap;
}

.atp-dropdown-item:hover {
    background: #f0f6fc;
    text-decoration: none;
    color: #333;
}

.atp-dropdown-item.active {
    background: #e8f0fe;
    font-weight: 600;
    color: #1a56db;
}

.atp-dropdown-item:first-child {
    border-radius: 5px 5px 0 0;
}

.atp-dropdown-item:last-child {
    border-radius: 0 0 5px 5px;
}

/* ==== BUTTONS MODE ==== */

.atp-buttons-wrap {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}

.atp-lang-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 6px;
    color: #555;
    font-size: 14px;
    font-family: inherit;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    line-height: 1.4;
}

.atp-lang-btn:hover {
    background: #e8f0fe;
    border-color: #2271b1;
    color: #2271b1;
    text-decoration: none;
}

.atp-lang-btn.active {
    background: #2271b1;
    border-color: #2271b1;
    color: #fff;
    font-weight: 600;
}

.atp-lang-btn:focus {
    outline: 2px solid #2271b1;
    outline-offset: 1px;
}

/* ==== FLAG ==== */

.atp-flag {
    font-size: 20px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
}

/* ==== LANG NAME ==== */

.atp-lang-name {
    line-height: 1.3;
}

/* ==== ANIMATIONS ==== */

@keyframes atp-fadeIn {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==== RESPONSIVE ==== */

@media (max-width: 768px) {
    .atp-dropdown-toggle {
        padding: 6px 10px;
        font-size: 13px;
    }

    .atp-lang-btn {
        padding: 5px 10px;
        font-size: 13px;
    }

    .atp-flag {
        font-size: 18px;
    }
}