/* Language Switch Menu Styles */

/* PC Version */
.navbar.navbar-top .header-right {
    display: flex;
    align-items: center;
}

.navbar.navbar-top #nav-language {
    list-style: none;
    display: flex;
    flex-direction: row;
    margin: 0;
    padding: 0;
    margin-right: 15px;
}

.navbar.navbar-top #nav-language li {
    border-left: 1px solid #ccc;
}

.navbar.navbar-top #nav-language li:first-child {
    border-left: none;
}

.navbar.navbar-top #nav-language li a {
    display: block;
    padding: 4px 12px;
    color: #333;
    text-decoration: none;
    font-size: 0.9rem;
}

.navbar.navbar-top #nav-language li a:hover {
    text-decoration: underline;
}

/* SP Version - Language Button */
#lang-btn {
    padding: 4px 8px;
    font-size: 10px;
    font-weight: bold;
    background-color: #fff;
    color: #0072bc;
    border: 1px solid #0072bc;
    border-radius: 3px;
    cursor: pointer;
    white-space: nowrap;
    margin-left: auto;
    margin-right: 5px;
}

#lang-btn:hover {
    background-color: #f0f8ff;
}

/* Prevent header text from overlapping with Language button on small screens */
@media screen and (max-width: 600px) {
    .navbar.navbar-top .logo strong {
        max-width: calc(100% - 200px);
        display: inline-block;
    }
}

@media screen and (max-width: 500px) {
    .navbar.navbar-top .logo strong {
        max-width: calc(100% - 190px);
    }
}

@media screen and (max-width: 400px) {
    .navbar.navbar-top .logo strong {
        max-width: calc(100% - 180px);
    }
}

@media screen and (max-width: 360px) {
    .navbar.navbar-top .logo strong {
        max-width: calc(100% - 170px);
        font-size: 14px;
    }
}

@media screen and (max-width: 320px) {
    .navbar.navbar-top .logo strong {
        max-width: calc(100% - 160px);
        font-size: 13px;
    }
}

/* =========================================
   Language Menu Modal
   ========================================= */

#lang-menu {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 90vh;
    background-color: #0072bc;
    z-index: 99999;
    overflow-y: auto;
    box-sizing: border-box;
}

#lang-menu.active {
    display: block;
}

/* Header */
#lang-menu .lang-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background-color: #0072bc;
    border-bottom: 2px solid rgba(255, 255, 255, 0.3);
}

#lang-menu .lang-menu-header > span {
    font-weight: bold;
    font-size: 16px;
    color: #fff;
}

/* Close button */
#lang-menu .close-btn {
    background: none;
    border: 1px solid #fff;
    border-radius: 4px;
    font-size: 12px;
    color: #fff;
    cursor: pointer;
    padding: 6px 12px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

#lang-menu .close-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

#lang-menu .close-btn span {
    font-size: 14px;
    line-height: 1;
}

/* Content container with padding (Inset Grouped Style) */
#lang-menu .lang-menu-content {
    padding: 10px;
}

/* Language list - card style with rounded corners */
#lang-menu ul#lang-menu-list {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    background-color: #1a4a6e;
    border-radius: 10px;
    overflow: hidden;
}

#lang-menu ul#lang-menu-list li {
    margin: 0 !important;
    padding: 0 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    list-style: none !important;
}

#lang-menu ul#lang-menu-list li:last-child {
    border-bottom: none;
}

/* Link style with arrow on right */
#lang-menu ul#lang-menu-list li a {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 10px 16px !important;
    color: #fff !important;
    text-decoration: none !important;
    font-size: 14px !important;
    background-color: transparent !important;
    transition: background-color 0.2s;
}

#lang-menu ul#lang-menu-list li a:hover {
    background-color: rgba(255, 255, 255, 0.1) !important;
    text-decoration: none !important;
}

#lang-menu ul#lang-menu-list li a .lang-text {
    flex: 1;
}

/* Arrow icon */
#lang-menu ul#lang-menu-list li a .arrow {
    font-family: sans-serif;
    font-size: 18px;
    font-weight: bold;
    color: #fff;
    opacity: 0.6;
    display: inline-block !important;
}

/* Footer with separator line and close button */
#lang-menu .lang-menu-footer {
    margin-top: 20px;
    margin-left: -10px;
    margin-right: -10px;
    padding: 20px 20px 0 20px;
    border-top: 2px solid rgba(255, 255, 255, 0.3);
    text-align: right;
}
