/* Combined user profile styles */
.user-profile-dropdown {
    position: relative;
    display: inline-block;
}

.profile-button {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 6px 14px;
    border-radius: 4px;
    background-color: #53AF31;
    border: none;
    transition: all 0.2s ease;
    color: white;
    height: 36px;
    width: auto;
    min-width: 100px;
}

.profile-button:hover {
    background-color: #478F2A;
}

.profile-avatar {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
    margin-right: 8px;
    font-size: 12px;
}

.profile-name {
    margin-right: 6px;
    font-size: 14px;
    font-weight: 500;
    max-width: 200px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dropdown-arrow {
    display: flex;
    align-items: center;
    transition: transform 0.2s;
    margin-left: 2px;
}

.dropdown-arrow.open {
    transform: rotate(180deg);
}

.profile-dropdown {
    position: absolute;
    top: calc(100% + 5px);
    right: 0;
    background-color: white;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    width: auto;
    min-width: 100px;
    z-index: 1000;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.user-info {
    padding: 12px 16px;
    background-color: #f9f9f9;
}

.user-name {
    font-weight: 600;
    font-size: 14px;
    color: #333;
}

.user-email {
    font-size: 12px;
    color: #666;
    margin-top: 3px;
    word-break: break-all;
}

hr {
    border: none;
    border-top: 1px solid #eee;
    margin: 0;
}

.dropdown-item {
    padding: 12px 16px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s;
    text-align: center;
}

.dropdown-item:hover {
    background-color: #f5f5f5;
}

.dropdown-item.logout {
    color: #d32f2f;
}

.dropdown-item.logout-plus {
    color: #8B0000;
    background-color: #fff5f5;
    border-top: 1px solid #ffe0e0;
    padding-top: 8px;
    padding-bottom: 8px;
}

.dropdown-item.logout-plus:hover {
    background-color: #ffe8e8;
}

.logout-plus-description {
    display: block;
    color: #666;
    font-size: 11px;
    margin-top: 2px;
    line-height: 1.2;
    font-style: italic;
}

.dropdown-item.version-info {
    color: #666;
    background-color: #f9f9f9;
    border-top: 1px solid #eee;
    padding-top: 8px;
    padding-bottom: 8px;
}

.dropdown-item.version-info:hover {
    background-color: #f0f0f0;
    color: #444;
}

.version-main {
    font-weight: 500;
    color: #333;
}

.version-details {
    display: block;
    color: #888;
    font-size: 11px;
    margin-top: 2px;
    line-height: 1.2;
    font-family: 'Courier New', monospace;
}

.profile-icon {
    margin-right: 8px;
    font-style: normal;
}

/* Login button style */
.login-button {
    font-weight: 500;
    padding: 6px 14px;
    background-color: #53AF31;
    border-color: #53AF31;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    height: 36px;
    border-radius: 4px;
    width: auto;
    display: inline-block;
    text-align: center;
}

.login-button:hover {
    background-color: #478F2A;
    border-color: #478F2A;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.login-button:active,
.login-button:focus {
    background-color: #3C7A24;
    border-color: #3C7A24;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    outline: none;
}

/* Legacy profile support */
.profile-container {
    position: relative;
    display: inline-block;
}

.profile-display {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 5px 10px;
    border-radius: 30px;
    background-color: var(--panel-bg, #f5f5f5);
    border: 1px solid var(--border-color, #ddd);
    transition: all 0.2s ease;
    cursor: pointer;
}

.profile-display:hover {
    background-color: var(--panel-highlight, #e8e8e8);
}

.profile-username {
    font-size: 0.9rem;
    font-weight: 500;
}

.profile-menu {
    position: absolute;
    top: 45px;
    right: 0;
    width: 220px;
    background-color: var(--panel-bg);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    z-index: 1000;
    border: 1px solid var(--border-color);
}

.profile-menu-header {
    padding: 15px;
    background-color: var(--panel-highlight);
    border-bottom: 1px solid var(--border-color);
}

.profile-menu-divider {
    height: 1px;
    background-color: var(--border-color);
    margin: 5px 0;
}

.profile-menu-items {
    padding: 10px 0;
}

.profile-menu-item {
    padding: 10px 15px;
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.profile-menu-item:hover {
    background-color: var(--panel-highlight);
}

.profile-menu-item.logout {
    color: #d32f2f;
}

.profile-menu-item.logout-plus {
    color: #8B0000;
    background-color: #fff5f5;
    border-top: 1px solid #ffe0e0;
    padding-top: 8px;
    padding-bottom: 8px;
}

.profile-menu-item.logout-plus:hover {
    background-color: #ffe8e8;
}

.profile-menu-item .logout-plus-description {
    display: block;
    color: #666;
    font-size: 11px;
    margin-top: 2px;
    line-height: 1.2;
    font-style: italic;
}

.profile-menu-icon {
    margin-right: 10px;
    font-size: 1.2rem;
}

/* Dark theme support */
:root[data-theme='dark'] .profile-button {
    background-color: #53AF31;
    color: white;
}

:root[data-theme='dark'] .profile-button:hover {
    background-color: #478F2A;
}

:root[data-theme='dark'] .profile-dropdown {
    background-color: #222;
    border-color: rgba(255, 255, 255, 0.1);
}

:root[data-theme='dark'] .user-info {
    background-color: #2a2a2a;
}

:root[data-theme='dark'] .user-name {
    color: #eee;
}

:root[data-theme='dark'] .user-email {
    color: #bbb;
}

:root[data-theme='dark'] hr {
    border-top-color: #333;
}

:root[data-theme='dark'] .dropdown-item {
    color: #eee;
}

:root[data-theme='dark'] .dropdown-item:hover {
    background-color: #333;
}

:root[data-theme='dark'] .dropdown-arrow {
    color: #fff;
}

:root[data-theme='dark'] .dropdown-item.logout {
    color: #ff6b6b;
}

:root[data-theme='dark'] .dropdown-item.logout-plus {
    color: #ff4444;
    background-color: #2a1a1a;
    border-top-color: #442222;
}

:root[data-theme='dark'] .dropdown-item.logout-plus:hover {
    background-color: #331a1a;
}

:root[data-theme='dark'] .logout-plus-description {
    color: #aaa;
}

:root[data-theme='dark'] .dropdown-item.version-info {
    color: #bbb;
    background-color: #2a2a2a;
    border-top-color: #333;
}

:root[data-theme='dark'] .dropdown-item.version-info:hover {
    background-color: #333;
    color: #ccc;
}

:root[data-theme='dark'] .version-main {
    color: #eee;
}

:root[data-theme='dark'] .version-details {
    color: #aaa;
}

:root[data-theme='dark'] .profile-display {
    background-color: var(--panel-bg);
    border-color: var(--border-color);
}

:root[data-theme='dark'] .profile-menu {
    background-color: var(--panel-bg);
    border-color: var(--border-color);
}

:root[data-theme='dark'] .profile-menu-header {
    background-color: var(--panel-highlight);
    border-color: var(--border-color);
}

:root[data-theme='dark'] .profile-menu-item:hover {
    background-color: var(--panel-highlight);
}

:root[data-theme='dark'] .profile-menu-item.logout {
    color: #ff6b6b;
}

:root[data-theme='dark'] .profile-menu-item.logout-plus {
    color: #ff4444;
    background-color: #2a1a1a;
    border-top-color: #442222;
}

:root[data-theme='dark'] .profile-menu-item.logout-plus:hover {
    background-color: #331a1a;
}

:root[data-theme='dark'] .profile-menu-item .logout-plus-description {
    color: #aaa;
}

/* Media queries for mobile responsiveness */
@media (max-width: 768px) {
    .profile-menu, .profile-dropdown {
        width: 200px;
    }
}
