/**
 * Profile Upload Styles
 * CSS for logo and background upload functionality
 */

/* ============ PROFILE SECTION STYLES ============ */

.profile-section {
    position: relative;
    margin-bottom: 30px;
}

/* Profile Header */
.profile-header {
    height: 200px;
    background: linear-gradient(135deg, #e6f3ff 0%, #b3d9f2 50%, #87ceeb 100%);
    background-size: cover;
    background-position: center;
    border-radius: 16px 16px 0 0;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
}

.profile-header:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 120, 213, 0.2);
}

.profile-header-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.profile-header:hover .profile-header-overlay,
.profile-header.drag-over .profile-header-overlay {
    opacity: 1;
}

.change-background-btn {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.change-background-btn:hover {
    background: var(--bg-primary);
    transform: scale(1.05);
}

/* Profile Logo Section */
.profile-logo-section {

}

.profile-logo-container {
    position: relative;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.profile-logo-container:hover {
    transform: scale(1.05);
}

.profile-logo {
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    position: relative;
    transition: all 0.3s ease;
}

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

.logo-initials {
    font-size: 36px;
    font-weight: 700;
    color: var(--blue-accent);
    text-transform: uppercase;
}



.profile-logo-container:hover .profile-logo-overlay,
.profile-logo-container.drag-over .profile-logo-overlay {
    opacity: 1;
}



/* Profile Info */
.profile-info {
    padding: 20px;
}

.profile-name {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

/* ============ UPLOAD STATES ============ */

/* Drag and Drop States */
.drag-over {
    border: 3px dashed var(--blue-accent) !important;
    background-color: rgba(0, 120, 213, 0.1) !important;
}

.profile-header.drag-over {
    border-radius: 16px;
}

.profile-logo.drag-over {
    border: 3px dashed var(--blue-accent) !important;
}

/* Uploading State */
.uploading {
    pointer-events: none;
    opacity: 0.7;
}

.upload-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    z-index: 10;
}

.profile-header .upload-loading-overlay {
    border-radius: 16px;
}

.profile-logo .upload-loading-overlay {
    border-radius: 50%;
}

.upload-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid white;
    border-radius: 50%;
    animation: upload-spin 1s linear infinite;
    margin-bottom: 12px;
}

.upload-text {
    font-size: 14px;
    font-weight: 600;
    text-align: center;
}

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

/* ============ NOTIFICATIONS ============ */

.upload-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    max-width: 400px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    border-left: 4px solid #ccc;
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

.upload-notification.show {
    transform: translateX(0);
}

.upload-notification-success {
    border-left-color: #10b981;
}

.upload-notification-error {
    border-left-color: #ef4444;
}

.upload-notification-info {
    border-left-color: var(--blue-accent);
}

.upload-notification-content {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    gap: 12px;
}

.upload-notification-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
    color: white;
    flex-shrink: 0;
}

.upload-notification-success .upload-notification-icon {
    background: #10b981;
}

.upload-notification-error .upload-notification-icon {
    background: #ef4444;
}

.upload-notification-info .upload-notification-icon {
    background: var(--blue-accent);
}

.upload-notification-message {
    flex: 1;
    font-size: 14px;
    color: var(--text-primary);
    line-height: 1.4;
}

.upload-notification-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 20px;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.upload-notification-close:hover {
    background: var(--bg-primary);
    color: var(--text-primary);
}

/* ============ RESPONSIVE DESIGN ============ */

@media (max-width: 768px) {
    .profile-header {
        height: 150px;
        border-radius: 12px 12px 0 0;
    }
    
    .profile-section {
        position: relative;
        margin-bottom: 0;
    }
    
    .profile-logo {
        width: 80px;
        height: 80px;
    }
    
    .logo-initials {
        font-size: 28px;
    }
    
    .profile-name {
        font-size: 20px;
    }
    
    .change-background-btn {
        padding: 10px 20px;
        font-size: 14px;
    }
    
    .change-logo-text {
        font-size: 10px;
    }
    
    .upload-notification {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }
    
    .upload-notification-content {
        padding: 12px 16px;
    }
}

@media (max-width: 480px) {
    .profile-header {
        height: 120px;
    }
    
    .profile-logo {
        width: 70px;
        height: 70px;
    }
    
    .logo-initials {
        font-size: 24px;
    }
    
    .profile-name {
        font-size: 18px;
    }
    
    .upload-spinner {
        width: 30px;
        height: 30px;
    }
    
    .upload-text {
        font-size: 12px;
    }
}

/* ============ ACCESSIBILITY ============ */

.profile-logo-container:focus,
.profile-header:focus {
    outline: 2px solid var(--blue-accent);
    outline-offset: 2px;
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .profile-header,
    .profile-logo-container,
    .upload-notification,
    .upload-spinner {
        transition: none;
        animation: none;
    }
    
    .profile-header:hover,
    .profile-logo-container:hover {
        transform: none;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .profile-header-overlay {
        background: rgba(0, 0, 0, 0.8);
    }
    
    .change-background-btn {
        background: white;
        border: 2px solid black;
    }
    
    .upload-notification {
        border: 2px solid black;
    }
}

/* ============ ADDITIONAL UTILITY CLASSES ============ */

.upload-hidden {
    display: none !important;
}

.upload-disabled {
    pointer-events: none;
    opacity: 0.6;
    cursor: not-allowed;
}

.upload-processing {
    position: relative;
    overflow: hidden;
}

.upload-processing::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.4),
        transparent
    );
    animation: upload-shimmer 2s infinite;
}

@keyframes upload-shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}


/* Profile Section Styles - Add to your main CSS or include here */
.profile-section {
    max-width: 100%;
}

.profile-header {
    position: relative;
    background-size: cover;
    background-position: center;
    overflow: hidden;
    -webkit-border-top-left-radius: 12px;
    -webkit-border-top-right-radius: 12px;
    -moz-border-radius-topleft: 12px;
    -moz-border-radius-topright: 12px;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
}

.profile-header::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 60%;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1000 100'%3E%3Cpath d='M0,50 Q250,20 500,50 T1000,50 L1000,100 L0,100 Z' fill='rgba(135,206,235,0.2)'/%3E%3C/svg%3E") no-repeat;
    background-size: auto;
  background-size: cover;
}

.profile-header-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease;
    
}

.profile-header:hover .profile-header-overlay {
    opacity: 1;
}

.change-background-btn {
    background: var(--bg-secondary);
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.change-background-btn:hover {
    background: var(--bg-primary);
    transform: translateY(-1px);
}

.profile-logo-section {
    position: relative;
    padding: 0 25px;
    margin-top: -50px;
    z-index: 2;
}

.profile-logo-container {
    position: relative;
    width: 100px;
    height: 100px;
    border-radius: 16px;
    background: var(--bg-secondary);
    border: 4px solid var(--bg-secondary);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.profile-logo-container:hover {
    transform: scale(1.02);
}

.profile-logo {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 600;
    color: var(--blue-accent);
    background: var(--bg-primary);
}

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

.profile-logo-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.profile-logo-container:hover .profile-logo-overlay {
    opacity: 1;
}

.change-logo-text {
    color: white;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    padding: 0 10px;
}

.profile-info {
    display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  gap: 20px;
}

.profile-name {
    font-weight: 600;
    color: var(--text-primary);
}

.profile-description {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.profile-stats {
    display: flex;
    gap: 24px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.stat {
    text-align: center;
    min-width: 60px;
}

.stat-number {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.stat-label {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 2px;
}

.profile-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.loading {
    position: relative;
    overflow: hidden;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { left: -100%; }
    100% { left: 100%; }
}

@media (max-width: 768px) {
    .profile-header {
        height: 90px;
    }
    
    .profile-logo-section {
        padding: 0 20px;
        margin-top: -40px;
    }
    
    .profile-logo-container {
        width: 80px;
        height: 80px;
    }
    
    .profile-info {
        padding: 15px 20px 20px;
    }
    
    .profile-name {
        font-size: 20px;
    }
    
    .profile-stats {
        gap: 16px;
    }
    
    .profile-actions {
        flex-direction: column;
    }
}