/* Profile Editor Styles */
.profile-editor-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000000;
    overflow-y: auto;
    padding: 20px;
    box-sizing: border-box;
    display: none;
}

.profile-editor-modal {
    background: white;
    max-width: 1000px;
    margin: 50px auto;
    border-radius: 15px;
    padding: 30px;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.profile-editor-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e5e7eb;
}

.profile-editor-title {
    margin: 0;
    color: #1f2937;
    font-size: 28px;
    font-weight: bold;
}

.profile-editor-close {
    background: #ef4444;
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.profile-editor-close:hover {
    background: #dc2626;
}

.profile-editor-form {
    display: grid;
    gap: 30px;
}

.profile-section {
    background: #f9fafb;
    border-radius: 12px;
    padding: 25px;
    border: 2px solid #e5e7eb;
    transition: border-color 0.2s;
}

.profile-section:hover {
    border-color: #d1d5db;
}

.profile-section-title {
    margin: 0 0 20px 0;
    color: #374151;
    font-size: 20px;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 10px;
}

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

.profile-field-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #374151;
    font-size: 14px;
}

.profile-field-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

.profile-field-input:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

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

.profile-field-select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 12px center;
    background-repeat: no-repeat;
    background-size: 16px;
    padding-right: 40px;
}

.profile-tags-input {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    padding: 12px 16px;
    border: 2px solid #d1d5db;
    border-radius: 8px;
    background: white;
    min-height: 50px;
}

.profile-tag {
    background: #6366f1;
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
}

.profile-tag-remove {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    cursor: pointer;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.profile-tag-remove:hover {
    background: rgba(255, 255, 255, 0.3);
}

.profile-tag-input {
    border: none;
    outline: none;
    flex: 1;
    min-width: 120px;
    padding: 4px;
    font-size: 14px;
}

.profile-array-item {
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 15px;
    position: relative;
}

.profile-array-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e5e7eb;
}

.profile-array-item-title {
    font-weight: 600;
    color: #374151;
    margin: 0;
}

.profile-array-item-remove {
    background: #ef4444;
    color: white;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.profile-array-item-remove:hover {
    background: #dc2626;
}

.profile-array-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.profile-array-grid-full {
    grid-column: 1 / -1;
}

.profile-editor-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid #e5e7eb;
}

.profile-editor-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    min-width: 120px;
}

.profile-editor-btn-primary {
    background: #10b981;
    color: white;
}

.profile-editor-btn-primary:hover {
    background: #059669;
    transform: translateY(-1px);
}

.profile-editor-btn-secondary {
    background: #6b7280;
    color: white;
}

.profile-editor-btn-secondary:hover {
    background: #4b5563;
}

.profile-editor-btn-danger {
    background: #ef4444;
    color: white;
}

.profile-editor-btn-danger:hover {
    background: #dc2626;
}

.profile-editor-loading {
    display: none;
    text-align: center;
    padding: 20px;
    color: #6b7280;
}

.profile-editor-success {
    display: none;
    background: #d1fae5;
    color: #065f46;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #a7f3d0;
}

.profile-editor-error {
    display: none;
    background: #fee2e2;
    color: #991b1b;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #fca5a5;
}

/* Responsive Design */
@media (max-width: 768px) {
    .profile-editor-modal {
        margin: 20px;
        padding: 20px;
    }
    
    .profile-array-grid {
        grid-template-columns: 1fr;
    }
    
    .profile-editor-actions {
        flex-direction: column;
    }
    
    .profile-editor-btn {
        width: 100%;
    }
}

/* Animation */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.profile-editor-modal {
    animation: slideIn 0.3s ease-out;
}

/* Focus styles for accessibility */
.profile-editor-btn:focus,
.profile-field-input:focus,
.profile-tag-input:focus {
    outline: 2px solid #6366f1;
    outline-offset: 2px;
}
