/* Profile Page Styles */

/* Profile Image Container */
.profile-image-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 20px 0 30px;
    position: relative;
}

/* Profile Picture Preview */
.profile-pic-preview {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--primary-color);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    position: relative;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.profile-pic-preview:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    border-color: var(--accent-color);
}

.profile-pic-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Overlay effect when hovering over the profile picture */
.profile-pic-preview::after {
    content: '\f030'; /* Camera icon from Font Awesome */
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.profile-pic-preview:hover::after {
    opacity: 1;
}

/* Processing Overlay */
.processing-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    z-index: 30;
    backdrop-filter: blur(4px);
}

.processing-overlay > div {
    text-align: center;
    color: white;
}

.processing-overlay i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: white;
    animation: spin 1s linear infinite;
}

.processing-overlay div:last-child {
    font-size: 0.75rem;
    font-weight: 500;
    opacity: 0.9;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Mobile-specific improvements for profile picture upload */
.profile-pic-preview {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

/* Ensure touch events work properly on mobile */
@media (max-width: 768px) {
    .profile-pic-preview {
        cursor: pointer;
        touch-action: manipulation;
    }
    
    .profile-pic-preview:active {
        transform: scale(0.95);
    }
}

/* Text hint for profile picture upload */
.profile-pic-hint {
    margin-top: 10px;
    color: var(--text-muted);
    font-size: 0.9rem;
    text-align: center;
}

/* Center text utility class */
.text-center {
    text-align: center;
}

/* Profile form styles */
.profile-form {
    max-width: 600px;
    margin: 0 auto;
}

.profile-form .form-group {
    margin-bottom: 20px;
}

.profile-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.profile-form input[readonly] {
    background-color: var(--border-color);
    cursor: not-allowed;
    opacity: 0.7;
}

.profile-form small {
    display: block;
    margin-top: 5px;
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .profile-pic-preview {
        width: 120px;
        height: 120px;
    }
}

.avatar-initials {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary-color);
    background: linear-gradient(135deg, var(--secondary-color) 60%, var(--card-background) 100%);
    border-radius: 50%;
    z-index: 1;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border: 2px solid var(--primary-color);
    transition: background 0.3s, color 0.3s;
}

/* Only show avatar-initials when inside .profile-pic-preview */
.avatar-initials:not(.profile-pic-preview .avatar-initials) {
    display: none !important;
}

.profile-pic-indicator {
    position: absolute;
    bottom: 8px;
    right: 8px;
    width: 36px;
    height: 36px;
    background: var(--primary-color);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
    border: 2px solid #fff;
    z-index: 3;
}

.profile-pic-indicator i {
    font-size: 1.1rem;
    margin-right: 2px;
}

.profile-pic-indicator .plus-badge {
    font-size: 1.2rem;
    font-weight: 900;
    margin-left: 2px;
    line-height: 1;
}
