/* Profile Picture Styles */

/* Small avatar for table */
.user-avatar-small {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #e5e7eb;
}

/* Medium avatar for forms/cards */
.user-avatar-medium {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #e5e7eb;
}

/* Large avatar for profiles */
.user-avatar-large {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #e5e7eb;
}

/* Profile picture upload container */
.profile-picture-upload {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: #f9fafb;
    border-radius: 8px;
}

.profile-picture-preview {
    position: relative;
    display: inline-block;
}

.profile-picture-preview img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #e5e7eb;
}

.profile-picture-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}

.profile-picture-actions button {
    padding: 8px 16px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}

.profile-picture-actions .btn-upload {
    background: #3b82f6;
    color: white;
}

.profile-picture-actions .btn-upload:hover {
    background: #2563eb;
}

.profile-picture-actions .btn-delete {
    background: #ef4444;
    color: white;
}

.profile-picture-actions .btn-delete:hover {
    background: #dc2626;
}

/* File input hidden */
.profile-picture-upload input[type="file"] {
    display: none;
}

/* Loading state */
.profile-picture-loading {
    position: relative;
    opacity: 0.5;
    pointer-events: none;
}

.profile-picture-loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    transform: translate(-50%, -50%);
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* User Header Avatar (in page header) */
.user-header-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #e5e7eb;
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
}

.user-header-avatar:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    border-color: #3b82f6;
}

/* User info container improvements */
.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-info img.user-header-avatar {
    flex-shrink: 0;
}
