/* profile.css - Google Account Style Profile Bubble */

/* Trigger Bubble in Header */
.profile-bubble-container {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 2px solid var(--accent-primary);
    cursor: pointer;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-bounce);
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.profile-bubble-container:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 15px var(--accent-glow);
}

.nav-avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.nav-initials {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-main);
}

/* Popup Container */
.profile-popup {
    position: fixed;
    top: 80px;
    right: 20px;
    width: 340px;
    background: var(--bg-card);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--card-border);
    border-radius: 28px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    z-index: 1000;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-20px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.profile-popup.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

/* Close btn */
.popup-close {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-muted);
    cursor: pointer;
}

.popup-close:hover { color: var(--text-main); }

/* Header part */
.profile-header {
    width: 100%;
    text-align: center;
    margin-bottom: 1.2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--card-border);
}

.popup-email {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* Avatar Section */
.avatar-section {
    position: relative;
    margin-bottom: 0.5rem;
}

.avatar-wrapper {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.popup-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    z-index: 2;
}

.popup-initials {
    font-size: 2.2rem;
    font-weight: 700;
    color: #fff;
    z-index: 1;
    position: absolute;
}

.avatar-upload-btn {
    position: absolute;
    bottom: -5px;
    right: -5px;
    background: var(--bg-main);
    border: 2px solid var(--card-border);
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 3;
    font-size: 0.9rem;
    transition: all var(--transition-fast);
}

.avatar-upload-btn:hover {
    transform: scale(1.1);
    background: var(--bg-card-hover);
}

/* Greeting */
.greeting-section {
    margin-bottom: 1.5rem;
}

#popup-greeting {
    font-size: 1.3rem;
    color: var(--text-main);
    font-weight: 600;
}

/* Metrics (Name / DOB) */
.profile-metrics {
    width: 100%;
    background: rgba(0,0,0,0.1);
    border-radius: 18px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    margin-bottom: 1.2rem;
}

.metric-input-group {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.metric-input-group label {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
}

.profile-input {
    background: var(--bg-card);
    border: 1px solid var(--card-border);
    padding: 0.6rem;
    border-radius: 8px;
    color: var(--text-main);
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.2s;
}

.profile-input:focus {
    border-color: var(--accent-primary);
}

.save-profile-btn {
    background: transparent;
    border: 1px solid var(--accent-primary);
    color: var(--accent-primary);
    border-radius: 18px;
    padding: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 0.5rem;
}

.save-profile-btn:hover {
    background: var(--accent-primary);
    color: #fff;
}

/* Logout Button */
.profile-actions {
    width: 100%;
}

.logout-btn {
    width: 100%;
    background: var(--bg-main);
    border: 1px solid var(--card-border);
    color: var(--text-main);
    padding: 1rem;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.logout-btn:hover {
    background: #ef4444; /* Rojo alerta */
    color: #fff;
    border-color: #ef4444;
}

/* Responsive fix */
@media (max-width: 600px) {
    .profile-popup {
        width: 90%;
        right: 5%;
    }
}
