/* APYDA header and language switcher styles. Extracted from header.php. */

/* 移動端菜單樣式 */
.mobile-menu {
    transform: translateX(-100%);
    transition: transform 0.3s ease-in-out;
}

.mobile-menu.active {
    transform: translateX(0);
}

/* 語言切換器樣式 */
.language-switcher .language-link {
    display: inline-block;
    padding: 0.5rem 1rem;
    margin: 0 0.25rem;
    background-color: #f3f4f6;
    color: #374151;
    text-decoration: none;
    border-radius: 0.375rem;
    transition: all 0.2s ease;
    font-size: 0.875rem;
}

.language-switcher .language-link:hover {
    background-color: #e5e7eb;
    color: #1f2937;
}

.language-switcher .language-link.current-language {
    background-color: #3b82f6;
    color: white;
}

.language-switcher-mobile .language-link {
    display: inline-block;
    padding: 0.5rem 1rem;
    margin: 0.25rem;
    background-color: #f9fafb;
    color: #374151;
    text-decoration: none;
    border-radius: 0.5rem;
    border: 1px solid #e5e7eb;
    transition: all 0.2s ease;
    font-size: 0.875rem;
}

.language-switcher-mobile .language-link:hover {
    background-color: #f3f4f6;
    border-color: #d1d5db;
}

.language-switcher-mobile .language-link.current-language {
    background-color: #3b82f6;
    color: white;
    border-color: #3b82f6;
}

/* 語言切換器下拉菜單樣式 */
.language-switcher-dropdown {
    position: relative;
    display: inline-block;
}

.language-switcher-button {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 500;
    color: #475569;
    text-decoration: none;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    min-width: 120px;
}

.language-switcher-button:hover {
    border-color: #3b82f6;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
    transform: translateY(-1px);
}

.language-switcher-dropdown button:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1), 0 4px 12px rgba(59, 130, 246, 0.15);
}

.language-switcher-button .flag-icon {
    font-size: 18px;
    line-height: 1;
}

.language-switcher-button .lang-name {
    flex: 1;
    text-align: left;
}

.language-switcher-button .dropdown-arrow {
    font-size: 12px;
    color: #94a3b8;
    transition: transform 0.2s ease;
}

.language-switcher-dropdown .dropdown-open #dropdown-arrow {
    transform: rotate(180deg);
}

.language-dropdown-menu {
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1), 0 4px 6px rgba(0, 0, 0, 0.05);
    min-width: 180px;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px) scale(0.95);
    transition: all 0.2s ease;
    overflow: hidden;
}

.language-switcher-dropdown .dropdown-open #language-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.language-dropdown-menu a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    color: #475569;
    text-decoration: none;
    transition: all 0.15s ease;
    border-bottom: 1px solid #f1f5f9;
    font-weight: 500;
}

.language-dropdown-menu a:last-child {
    border-bottom: none;
}

.language-dropdown-menu a:hover {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    color: #3b82f6;
    padding-left: 20px;
}

.language-dropdown-menu a.current {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    color: #1d4ed8;
    font-weight: 600;
}

.language-dropdown-menu a .flag-icon {
    font-size: 16px;
    line-height: 1;
}

.language-dropdown-menu a .check-icon {
    margin-left: auto;
    font-size: 14px;
    color: #10b981;
}

/* 移動端語言切換器下拉樣式 */
@media (max-width: 768px) {
    .language-switcher-dropdown {
        display: none;
    }

    .language-switcher-dropdown #language-dropdown-menu {
        right: 0;
        left: auto;
        width: 200px;
    }
}
