325 lines
4.8 KiB
CSS
325 lines
4.8 KiB
CSS
/* src/pages/ProfilePage.css */
|
|
|
|
/* Overlay */
|
|
.profile-overlay {
|
|
position: fixed;
|
|
inset: 0;
|
|
background-color: rgba(0, 0, 0, 0.65);
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
z-index: 20000;
|
|
padding: 20px;
|
|
}
|
|
|
|
/* Modal */
|
|
.profile-modal {
|
|
background: #ffffff;
|
|
border-radius: 12px;
|
|
padding: 20px;
|
|
width: min(600px, 96%);
|
|
max-width: 600px;
|
|
box-shadow: 0 18px 60px rgba(0, 0, 0, 0.5);
|
|
position: relative;
|
|
}
|
|
|
|
/* Botão fechar */
|
|
.profile-close {
|
|
position: absolute;
|
|
top: 15px;
|
|
right: 15px;
|
|
background: none;
|
|
border: none;
|
|
font-size: 24px;
|
|
color: #666;
|
|
cursor: pointer;
|
|
padding: 5px;
|
|
}
|
|
|
|
.profile-close:hover {
|
|
color: #333;
|
|
}
|
|
|
|
/* Layout */
|
|
.profile-content {
|
|
display: flex;
|
|
gap: 30px;
|
|
align-items: flex-start;
|
|
padding: 20px 10px;
|
|
}
|
|
|
|
/* Avatar */
|
|
.profile-left {
|
|
width: 160px;
|
|
display: flex;
|
|
justify-content: center;
|
|
}
|
|
|
|
.avatar-wrapper {
|
|
position: relative;
|
|
width: 140px;
|
|
height: 140px;
|
|
}
|
|
|
|
.avatar-square {
|
|
width: 100%;
|
|
height: 100%;
|
|
border-radius: 8px;
|
|
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
|
overflow: hidden;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
box-shadow: 0 4px 12px rgba(0,0,0,0.15);
|
|
}
|
|
|
|
.avatar-img {
|
|
width: 100%;
|
|
height: 100%;
|
|
object-fit: cover;
|
|
border-radius: 8px;
|
|
}
|
|
|
|
.avatar-placeholder {
|
|
font-size: 2rem;
|
|
font-weight: bold;
|
|
color: white;
|
|
}
|
|
|
|
.avatar-edit-btn {
|
|
position: absolute;
|
|
right: -8px;
|
|
bottom: -8px;
|
|
border: none;
|
|
background: #ffffff;
|
|
padding: 8px;
|
|
border-radius: 50%;
|
|
box-shadow: 0 4px 8px rgba(0,0,0,0.15);
|
|
cursor: pointer;
|
|
font-size: 0.9rem;
|
|
transition: all 0.2s ease;
|
|
}
|
|
|
|
.avatar-edit-btn:hover {
|
|
background: #f0f0f0;
|
|
transform: scale(1.1);
|
|
}
|
|
|
|
.avatar-edit-btn.uploading {
|
|
background: #ffd700;
|
|
}
|
|
|
|
.upload-status {
|
|
position: absolute;
|
|
bottom: -25px;
|
|
left: 0;
|
|
right: 0;
|
|
text-align: center;
|
|
font-size: 0.8rem;
|
|
color: #666;
|
|
}
|
|
|
|
/* Informações */
|
|
.profile-right {
|
|
flex: 1;
|
|
min-width: 250px;
|
|
}
|
|
|
|
.profile-name-row {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 10px;
|
|
margin-bottom: 15px;
|
|
}
|
|
|
|
.profile-username {
|
|
margin: 0;
|
|
font-size: 1.8rem;
|
|
color: #222;
|
|
font-weight: 600;
|
|
}
|
|
|
|
.profile-edit-inline {
|
|
background: none;
|
|
border: none;
|
|
cursor: pointer;
|
|
font-size: 1rem;
|
|
color: #444;
|
|
padding: 5px;
|
|
border-radius: 4px;
|
|
}
|
|
|
|
.profile-edit-inline:hover {
|
|
background: #f5f5f5;
|
|
}
|
|
|
|
/* Edição de nome */
|
|
.name-edit-wrapper {
|
|
width: 100%;
|
|
}
|
|
|
|
.profile-name-input {
|
|
font-size: 1.6rem;
|
|
padding: 5px 8px;
|
|
border: 2px solid #007bff;
|
|
border-radius: 6px;
|
|
width: 100%;
|
|
font-weight: 600;
|
|
color: #222;
|
|
}
|
|
|
|
.profile-name-input:focus {
|
|
outline: none;
|
|
border-color: #0056b3;
|
|
}
|
|
|
|
.name-edit-hint {
|
|
font-size: 0.75rem;
|
|
color: #666;
|
|
margin-top: 5px;
|
|
}
|
|
|
|
/* Informações do perfil */
|
|
.profile-info {
|
|
margin: 20px 0;
|
|
}
|
|
|
|
.profile-email,
|
|
.profile-role {
|
|
margin: 8px 0;
|
|
color: #555;
|
|
font-size: 1rem;
|
|
display: flex;
|
|
gap: 8px;
|
|
}
|
|
|
|
.profile-email span,
|
|
.profile-role span {
|
|
color: #777;
|
|
min-width: 50px;
|
|
}
|
|
|
|
/* Mensagem de erro */
|
|
.error-message {
|
|
background-color: #fee;
|
|
color: #c33;
|
|
padding: 10px;
|
|
border-radius: 6px;
|
|
border: 1px solid #fcc;
|
|
margin: 15px 0;
|
|
font-size: 0.9rem;
|
|
}
|
|
|
|
/* Ações */
|
|
.profile-actions {
|
|
display: flex;
|
|
gap: 10px;
|
|
margin-top: 20px;
|
|
}
|
|
|
|
.btn {
|
|
padding: 10px 20px;
|
|
border-radius: 6px;
|
|
border: none;
|
|
cursor: pointer;
|
|
font-size: 0.9rem;
|
|
font-weight: 500;
|
|
transition: all 0.2s ease;
|
|
}
|
|
|
|
.btn-close {
|
|
background: #f0f0f0;
|
|
color: #222;
|
|
}
|
|
|
|
.btn-close:hover {
|
|
background: #e0e0e0;
|
|
}
|
|
|
|
.btn-clear {
|
|
background: #dc3545;
|
|
color: white;
|
|
}
|
|
|
|
.btn-clear:hover {
|
|
background: #c82333;
|
|
}
|
|
|
|
/* Responsividade */
|
|
@media (max-width: 680px) {
|
|
.profile-content {
|
|
flex-direction: column;
|
|
gap: 20px;
|
|
align-items: center;
|
|
text-align: center;
|
|
}
|
|
|
|
.profile-left {
|
|
width: 100%;
|
|
}
|
|
|
|
.avatar-wrapper {
|
|
margin: 0 auto;
|
|
}
|
|
|
|
.profile-email,
|
|
.profile-role {
|
|
justify-content: center;
|
|
}
|
|
|
|
.profile-actions {
|
|
justify-content: center;
|
|
}
|
|
}
|
|
|
|
@media (max-width: 480px) {
|
|
.profile-modal {
|
|
padding: 15px;
|
|
}
|
|
|
|
.profile-content {
|
|
padding: 10px 5px;
|
|
}
|
|
|
|
.profile-username {
|
|
font-size: 1.5rem;
|
|
}
|
|
|
|
.avatar-wrapper {
|
|
width: 120px;
|
|
height: 120px;
|
|
}
|
|
}.avatar-edit-btn {
|
|
background: #007bff;
|
|
color: white;
|
|
border: none;
|
|
padding: 8px 16px;
|
|
border-radius: 6px;
|
|
cursor: pointer;
|
|
font-size: 14px;
|
|
margin-top: 10px;
|
|
transition: background-color 0.2s;
|
|
}
|
|
|
|
.avatar-edit-btn:hover {
|
|
background: #0056b3;
|
|
}
|
|
|
|
.avatar-edit-btn.uploading {
|
|
background: #6c757d;
|
|
cursor: not-allowed;
|
|
}
|
|
|
|
.profile-edit-inline {
|
|
background: #f8f9fa;
|
|
border: 1px solid #dee2e6;
|
|
padding: 6px 12px;
|
|
border-radius: 4px;
|
|
cursor: pointer;
|
|
font-size: 13px;
|
|
margin-left: 10px;
|
|
}
|
|
|
|
.profile-edit-inline:hover {
|
|
background: #e9ecef;
|
|
} |