/* Profile Edit Page Specific Styles */

/* Profile Edit Section */
.profile-edit-section {
    max-width: 800px;
    margin: 0 auto;
}

.section-header {
    margin-bottom: 2rem;
    text-align: center;
}

/* Edit Cards */
.edit-card {
    margin-bottom: 2rem;
    padding: 2rem;
}

.card-header {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-secondary);
}

/* Profile Picture Upload Section */
.profile-picture-upload-section {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.current-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 2px solid rgba(178, 120, 255, 0.5);
    background: rgba(178, 120, 255, 0.08);
    box-shadow: 0 0 0 4px rgba(178, 120, 255, 0.1), 0 0 30px rgba(178, 120, 255, 0.2);
    overflow: visible;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    flex-shrink: 0;
}

.current-avatar img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.upload-controls {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    flex: 1;
}

/* Form Styles */
.profile-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-label {
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    color: var(--text-primary);
}

.form-input,
.form-textarea {
    background: var(--bg-secondary);
    border: 2px solid var(--border-primary);
    border-radius: 8px;
    padding: 1rem;
    color: var(--text-primary);
    font-size: var(--text-base);
    transition: all 0.3s ease;
    font-family: var(--font-family-primary);
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: rgba(178, 120, 255, 0.55);
    box-shadow: 0 0 0 3px rgba(178, 120, 255, 0.1);
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: var(--text-muted);
}

.form-textarea {
    resize: vertical;
    min-height: 100px;
}

/* Settings List */
.settings-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.setting-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    background: var(--bg-transparent);
    border-radius: 8px;
    border: 1px solid var(--border-primary);
    transition: all 0.3s ease;
}

.setting-item:hover {
    border-color: rgba(178, 120, 255, 0.25);
    background: rgba(178, 120, 255, 0.04);
}

.setting-info {
    flex: 1;
}

.setting-info h4 {
    margin-bottom: 0.25rem;
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
    cursor: pointer;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--border-primary);
    transition: 0.3s;
    border-radius: 24px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: var(--text-primary);
    transition: 0.3s;
    border-radius: 50%;
}

.toggle-switch input:checked + .toggle-slider {
    background-color: #B278FF;
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(26px);
}

/* Security Actions */
.security-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Save Actions */
.save-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-secondary);
}

/* Active Button State */
.action-btn.active {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 2px solid var(--border-secondary);
}

.action-btn.active:hover {
    background: var(--bg-tertiary);
    border-color: var(--border-primary);
    transform: translateY(-2px);
}

/* Clickable Avatar */
.profile-avatar[onclick] {
    transition: all 0.3s ease;
}

.profile-avatar[onclick]:hover {
    transform: scale(1.05);
    box-shadow: 0 0 0 4px rgba(178, 120, 255, 0.2), 0 0 40px rgba(178, 120, 255, 0.35);
}

/* Responsive Design */
@media (max-width: 768px) {
    .profile-edit-section {
        padding: 0 1rem;
    }
    
    .edit-card {
        padding: 1.5rem;
        margin-bottom: 1.5rem;
    }
    
    .profile-picture-upload-section {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
    }
    
    .upload-controls {
        width: 100%;
    }
    
    .security-actions {
        flex-direction: column;
    }
    
    .save-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .save-actions .btn-primary,
    .save-actions .btn-secondary {
        width: 100%;
        max-width: 300px;
    }
}

@media (max-width: 480px) {
    .edit-card {
        padding: 1rem;
    }
    
    .current-avatar {
        width: 100px;
        height: 100px;
    }
    
    .current-avatar img {
        width: 90px;
        height: 90px;
    }
    
    .setting-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .toggle-switch {
        align-self: flex-end;
    }
}

/* Social Media Connect */
.social-connect-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.social-connect-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    background: var(--bg-transparent);
    border-radius: 10px;
    border: 1px solid var(--border-primary);
    gap: 1rem;
    transition: border-color 0.3s ease;
}

.social-connect-item.is-connected {
    border-color: rgba(74, 222, 128, 0.35);
    background: rgba(74, 222, 128, 0.04);
}

.social-connect-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
    min-width: 0;
}

.social-connect-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.social-connect-icon svg {
    width: 22px;
    height: 22px;
}

.social-connect-icon--instagram {
    background: linear-gradient(135deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    color: #fff;
}

.social-connect-name {
    font-size: var(--text-base);
    font-weight: var(--font-semibold);
    color: var(--text-primary);
    margin-bottom: 2px;
}

.social-connect-status {
    font-size: var(--text-sm);
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.social-connect-status.is-connected {
    color: #4ade80;
}

.social-connect-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-shrink: 0;
}

/* Loading States */
.profile-edit-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 200px;
}

.profile-edit-loading::after {
    content: '';
    width: 36px;
    height: 36px;
    border: 3px solid rgba(178, 120, 255, 0.15);
    border-top: 3px solid #B278FF;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Success/Error Messages (Style Guide cards) */
.profile-edit-message {
    margin-bottom: 1.5rem;
    padding: 1.5rem;
}

.profile-edit-message h4 {
    margin-bottom: 0.5rem;
}

.profile-edit-message p {
    margin: 0;
}

/* File Upload Preview */
.avatar-preview {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 2px solid rgba(178, 120, 255, 0.5);
    box-shadow: 0 0 0 4px rgba(178, 120, 255, 0.1), 0 0 24px rgba(178, 120, 255, 0.2);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    margin: 0 auto 1rem;
}

.avatar-preview img {
    width: 112px;
    height: 112px;
    object-fit: cover;
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}
