/* 
^ Styling the drop-down menu for language switcher
* Auther : Fadi Nouh
* URL : https://bluebit.dev
* Repository: https://github.com/bluebits-academy/language-switcher
*/

@import url('https://fonts.googleapis.com/css2?family=Didact+Gothic&display=swap');
@import url('https://cdnjs.cloudflare.com/ajax/libs/normalize/8.0.1/normalize.css');



.logo {
    width: 100px;
}

.logo img {
    width: 100px;
    
}

#header {
    overflow: visible !important;
}

.lang-menu {
    position: absolute !important;
    top: 20px;
    right: 20px;
    z-index: 2000;
}

.selected-lang {
    cursor: pointer;
    padding: 8px 10px;
    background: #fff;
    border-radius: 5px;
    display: flex;
    align-items: center;
}

.lang-menu ul {
    display: none;
    position: absolute;
    top: 100%;         /* TOUCHES the selected-lang (no gap) */
    right: 0;
    margin: 0;
    padding: 0;
    width: 85px;
    background: rgba(255, 116, 0, 0.9);
    border-radius: 5px;
    box-shadow: 0 1px 10px rgba(0,0,0,0.2);
}

.lang-menu:hover ul {
    display: block;
}

.lang-menu ul li {
    list-style: none;
}

.lang-menu ul li a {
    display: block;
    padding: 8px 10px;
}


.lang-menu ul li:hover {
    background-color: #11f2f2;
}

.lang-menu ul li a:before {
    content: '';
    display: inline-block;
    width: 25px;
    height: 25px;
    vertical-align: middle;
    margin-right: 10px;
    background-size: contain;
    background-repeat: no-repeat;
}

.lang-menu ul li a.selected {
    background: rgba(255, 255, 33, 0.9); /* semi-opaque */
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 4px;               /* space between flag and text */
    padding: 2px 6px;       /* smaller padding than main box */
    margin: 2px auto;        /* center horizontally in dropdown */
}

.lang-menu ul li a.selected:before {
    width: 24px;             /* slightly smaller than main flag */
    height: 24px;
    background-size: cover;
    background-repeat: no-repeat;
    display: block;
    align-self: center;      /* vertical center */
}


.pl:before {
    background-image: url('../../images/pl.png');
}

.en:before {
    background-image: url('../../images/en.png');
}

.lang-menu:hover ul {
    display: block;
}

.lang-menu .selected-lang {
    display: flex;
    align-items: center;   /* vertical centering */
    justify-content: center; /* horizontal alignment of content if needed */
    gap: 6px;
    height: 32px;          /* container height */
    background: rgba(255,255,255,0.5);
    border-radius: 6px;
    cursor: pointer;
    box-sizing: border-box;
    padding: 2px 4px;      /* smaller left/right padding */
}

.lang-menu .selected-lang:before {
    content: '';
    width: 42px;           /* slightly smaller than container */
    height: 24px;
    background-size: cover; /* cover keeps full flag aspect ratio */
    background-repeat: no-repeat;
    flex-shrink: 0;
    display: flex;
    align-self: center;     /* vertical centering */
}


/* flags based on selected class */
.selected-lang.en:before {
    background-image: url('../../images/en.png');
}
