/* Кнопка профиля (иконка + текущая роль) */
.profile-button {
    position: absolute;
    top: 10px;
    right: 20px;
    z-index: 100;
}

.profile-icon {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 10px;
    border-radius: 20px;
    transition: background-color 0.2s;
}

.profile-icon:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.current-role {
    font-size: 14px;
    color: #333;
    text-transform: capitalize;
}

/* Модальное окно */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    overflow: auto;
}

.modal-content {
    background-color: #fff;
    margin: 15% auto;
    padding: 25px 20px;
    border: 1px solid #888;
    width: 300px;
    max-width: 90%;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    text-align: center;
    position: relative;
}

.close {
    color: #aaa;
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}

.profile-icon img {
    width: 32px;
    height: 32px;
    object-fit: cover;
    border-radius: 50%;
}

.close:hover,
.close:focus {
    color: black;
    text-decoration: none;
}

.modal-content h2 {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 1.5rem;
    color: #222;
}

.role-btn {
    display: block;
    width: 100%;
    padding: 12px;
    margin: 10px 0;
    background-color: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    color: #333;
    transition: all 0.2s;
}

.role-btn:hover {
    background-color: #e9e9e9;
    border-color: #ccc;
}

.role-btn:active {
    transform: scale(0.98);
}

@media (max-width: 600px) {
    .profile-button {
        top: 5px;
        right: 10px;
    }
    .modal-content {
        margin: 30% auto;
        width: 80%;
    }
}