@charset "UTF-8";

.site-avatar-bar {
    position: absolute;
    top: 1rem;
    right: 2rem;
    z-index: 999;
}

.site-avatar-bar .material-icons {
    font-size: 1.8rem;
}

.user-menu {
    position: relative;
    display: inline-block;
    font-family: var(--font-base);
}

.user-button {
    background-color: var(--color-bg);
    color: var(--color-text-body);
    border-radius: 50%;
    width: 3rem;
    height: 3rem;
    font-weight: bold;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border: 1px solid var(--color-border);
}

.user-button:hover {
    background-color: var(--color-gradient-top);
    border-color: var(--color-border-hover);
}

.user-dropdown {
    position: absolute;
    top: 3.5rem;
    right: 0;
    min-width: 200px;
    background: var(--color-dropdown-bg);
    color: var(--color-dropdown-text);
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-soft);
    z-index: 999;
    border-radius: 0.5rem;
}

.user-info {
    padding: 0.8rem;
    /* font-size: 1rem; */
    border-bottom: 1px solid var(--color-border);
    text-align: center;
    font-family: Audiowide;
    /* font-size: 1.4em !important; */
    letter-spacing: 1px;
    color: var(--color-text-heading-alt);
}

.dropdown-block {
    font-size: 1rem;
    text-align: center;
}

.dropdown-block:first-child {
    border-top-left-radius: 0.5rem;
    border-top-right-radius: 0.5rem;
}

.dropdown-block:last-child {
    border-bottom: none;
    border-bottom-left-radius: 0.5rem;
    border-bottom-right-radius: 0.5rem;
}

.dropdown-button {
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    padding: 0.5rem;
    /* color: var(--color-dropdown-text); */
}

.dropdown-link {
    display: flex;
    padding: 0.7rem 1rem;
    color: var(--color-dropdown-text);
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
}

.dropdown-link:hover,
.dropdown-button:hover {
    cursor: pointer;
    text-decoration: none !important;
    background: var(--color-sidebar-hover-bg);
}



/* === THEME SELECTOR === */
.user-theme-selector {
    display: flex;
    justify-content: center;
    padding: 0;
    background-color: var(--color-bg-alt);
}

.dropdown-separator {
    border-bottom: 1px solid var(--color-border);
}

.theme-options {
    display: flex;
    gap: 0rem;
    width: 100%;
}

.theme-option {
    flex: 1;
    padding: 0.5rem;
    border: none;
    background: none;
    color: var(--color-dropdown-text);
    font-size: 0.85rem;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    transition: all 0.2s ease-in-out;
    opacity: 0.8;
}

.theme-option:hover {
    text-decoration: none !important;
    background: var(--color-sidebar-hover-bg);
}

.theme-option[aria-pressed="true"] {
    background: var(--color-sidebar-hover-bg);
    text-decoration: none;
    font-weight: bold;
    opacity: 1;
}












.site-avatar-bar {
    position: absolute;
    top: 1rem;
    right: 2rem;
    z-index: 999;
    display: flex;
    align-items: center;
    gap: 1rem;
    /* Spazio tra lente e avatar */
}

/* Nuova icona lente */
.search-button {
    background-color: transparent;
    border: 1px solid transparent;
    /* mantiene la dimensione visiva */
    border-radius: 50%;
    width: 3rem;
    height: 3rem;
    color: var(--color-text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    box-shadow: none;
    transition: color 0.2s, background 0.2s;
    cursor: pointer;
}

.search-button:hover {
    background-color: var(--color-gradient-top);
    /* se vuoi stesso effetto hover */
    color: var(--color-text-body);
    border-color: var(--color-border-hover);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

a.search-button {
    text-decoration: none !important;
}




/* LANGUAGE */
/* Il contenitore deve essere relativo per posizionare il sottomenu */
.language-selector-container {
    position: relative;
}

.language-submenu {
    display: none; /* Di default è nascosto */
    position: absolute;
    right: 100%;
    top: 0;
    margin-right: 10px;
    background: var(--color-dropdown-bg);
    border: 1px solid var(--color-border);
    border-radius: 0.5rem;
    box-shadow: var(--shadow-soft);
    min-width: 220px;
    z-index: 1001;
    flex-direction: column;
    padding: 0.5rem 0;
}

/* Quando NON ha l'attributo hidden, mostralo come flex */
.language-submenu:not([hidden]) {
    display: flex;
}

.language-submenu .dropdown-button {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 0.7rem 1rem;
    color: var(--color-dropdown-text);
    text-decoration: none;
    transition: background 0.2s;
}

.language-submenu .dropdown-button:hover {
    background: var(--color-sidebar-hover-bg);
}