/* =================================================================
 * FB Mobile Menu + Lang Dropdown v1.4.0
 * ================================================================= */

/* === Header actions wrapper (a [fb_lang_flags] helyén) === */
.fb-header-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    flex-wrap: nowrap;
}

/* === Nyelvválasztó dropdown (mind asztali, mind mobil nézet) === */
.fb-lang-dropdown {
    position: relative;
    display: inline-block;
}

.fb-lang-dropdown-trigger {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 4px;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    font-size: 18px;
    line-height: 1;
    color: #1A1A1A;
    transition: all 0.2s ease;
}

.fb-lang-dropdown-trigger:hover {
    border-color: rgba(197, 160, 74, 0.3);
    background: rgba(197, 160, 74, 0.05);
}

.fb-lang-dropdown.open .fb-lang-dropdown-trigger {
    border-color: #C5A04A;
    background: rgba(197, 160, 74, 0.08);
}

.fb-lang-dropdown-trigger .fb-lang-flag-icon {
    font-size: 20px;
    line-height: 1;
}

.fb-lang-dropdown-trigger .fb-lang-code {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #6B6B6B;
}

.fb-lang-dropdown-trigger .fb-lang-chevron {
    transition: transform 0.2s ease;
}

.fb-lang-dropdown.open .fb-lang-chevron {
    transform: rotate(180deg);
}

.fb-lang-dropdown-menu {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    min-width: 100px;
    background: #FFFFFF;
    border: 1px solid rgba(226, 221, 211, 0.8);
    border-radius: 4px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    padding: 4px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0s linear 0.2s;
    z-index: 1000;
}

.fb-lang-dropdown.open .fb-lang-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0s;
}

.fb-lang-dropdown-menu .fb-lang-flag {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 3px;
    text-decoration: none !important;
    font-size: 18px;
    line-height: 1;
    color: #1A1A1A;
    opacity: 0.85;
    transition: all 0.15s ease;
    width: auto;
    height: auto;
    border: none;
    transform: none;
    justify-content: flex-start;
}

.fb-lang-dropdown-menu .fb-lang-flag:hover {
    background: rgba(197, 160, 74, 0.08);
    opacity: 1;
}

.fb-lang-dropdown-menu .fb-lang-flag.fb-lang-active {
    background: rgba(197, 160, 74, 0.12);
    opacity: 1;
    transform: none;
}

.fb-lang-dropdown-menu .fb-lang-flag::after {
    content: attr(data-code);
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #6B6B6B;
}

/* === Hamburger gomb (csak mobil/tablet nézetben) === */
.fb-mm-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    color: #1A1A1A;
    padding: 0;
    transition: opacity 0.2s ease;
}

.fb-mm-toggle:hover {
    opacity: 0.7;
}

.fb-mm-toggle .fb-mm-icon-close { display: none; }
.fb-mm-toggle.active .fb-mm-icon-open { display: none; }
.fb-mm-toggle.active .fb-mm-icon-close { display: block; }

/* Mobilon és tableten megjelenik a hamburger */
@media (max-width: 1024px) {
    .fb-mm-toggle { display: inline-flex; }
}

/* Mobilon kompaktabb dropdown (csak flag, code rejtve) */
@media (max-width: 480px) {
    .fb-lang-dropdown-trigger {
        padding: 6px 8px;
        gap: 4px;
    }
    .fb-lang-dropdown-trigger .fb-lang-code {
        display: none;
    }
}

/* === Mobile menu panel (csak menü, nyelvválasztó NINCS!) === */
.fb-mm-panel {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    background: rgba(247, 245, 241, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 80px 24px 32px;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0s linear 0.3s;
}

.fb-mm-panel.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0s;
}

body.fb-mm-open { overflow: hidden; }

.fb-mm-content {
    max-width: 480px;
    margin: 0 auto;
}

.fb-mm-menu .fb-menu-list,
.fb-mm-menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.fb-mm-menu .fb-menu-list li,
.fb-mm-menu ul li {
    border-radius: 6px;
    transition: background 0.2s ease;
}

.fb-mm-menu .fb-menu-list a,
.fb-mm-menu ul li a {
    display: block;
    padding: 16px 20px;
    font-family: 'Playfair Display', serif;
    font-size: 22px;
    font-weight: 600;
    color: #1A1A1A;
    text-decoration: none !important;
    border-bottom: 1px solid rgba(226, 221, 211, 0.6);
    transition: color 0.2s ease;
}

.fb-mm-menu .fb-menu-list a::after,
.fb-mm-menu ul li a::after { display: none; }

.fb-mm-menu .fb-menu-list a:hover,
.fb-mm-menu ul li a:hover { color: #C5A04A; }

.fb-mm-menu .current-menu-item a,
.fb-mm-menu .current_page_item a { color: #C5A04A; }

/* === Bezárás (X) gomb a panel jobb felső sarkában === */
.fb-mm-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    color: #1A1A1A;
    transition: all 0.2s ease;
    padding: 0;
    z-index: 10;
}

.fb-mm-close:hover {
    background: rgba(197, 160, 74, 0.12);
    color: #C5A04A;
    transform: rotate(90deg);
}
